<commit_before>/*
 * Copyright (c) 2008-2015 The Open Source Geospatial Foundation
 *
 * Published under the BSD license.
 * See https://github.com/geoext/geoext2/blob/master/license.txt for the full
 * text of the license.
 */

/*
 * @requires GeoExt/Version.js
 * @include OpenLayers/Symbolizer/Raster.js
 */

/**
 * A specific model for Raster Symbolizer classifications.
 *
 * Preconfigured with an Ajax proxy and a JSON reader.
 *
 * @class GeoExt.data.RasterStyleModel
 */
Ext.define('GeoExt.data.RasterStyleModel',{
    extend: 'Ext.data.Model',
    requires : [
         'Ext.data.JsonReader',
         'GeoExt.Version'
    ],
    idProperty: "filter",
    fields: [{
        name: "symbolizers",
        mapping: function(v) {
            return {
                fillColor: v.color,
                fillOpacity: v.opacity,
                stroke: false
            };
        },
        defaultValue: null
    }, {
        name: "filter",
        mapping: "quantity",
        type: "float",
        sortType: 'asFloat',
        sortDir: 'ASC'
    }, {
        name: "label",
        mapping: function(v) {
            // fill label with quantity if empty
            return v.label || v.quantity;
        }
    }],
    proxy: {
        type : 'memory',
        // TODO GeoExt ist not defined on construction so we're checking the ExtJS-Version without
        // GeoExt.isExt4. Maybe this can be improved/beautified
        reader: (function(){
            if (Ext.versions.extjs.major > 4) {
                return {
                    type: 'json',
                    rootProperty: 'colorMap'
                }
            } else {
                return {
                    type: 'json',
                    root: 'colorMap'
                }
            }
        })()
    },
    listeners:{
        // TODO cleanup when ExtJS4-Support is no longer needed Removed in ExtJS5
        idchanged:function(rec){
            for(var i=0;i<rec.stores.length;i++){
                var store = rec.stores[i];
                store.sort();
            }
        }
    }
});<commit_msg>Fix typo in comment, reformat TODO.<commit_after>/*
 * Copyright (c) 2008-2015 The Open Source Geospatial Foundation
 *
 * Published under the BSD license.
 * See https://github.com/geoext/geoext2/blob/master/license.txt for the full
 * text of the license.
 */

/*
 * @requires GeoExt/Version.js
 * @include OpenLayers/Symbolizer/Raster.js
 */

/**
 * A specific model for Raster Symbolizer classifications.
 *
 * Preconfigured with an Ajax proxy and a JSON reader.
 *
 * @class GeoExt.data.RasterStyleModel
 */
Ext.define('GeoExt.data.RasterStyleModel',{
    extend: 'Ext.data.Model',
    requires : [
         'Ext.data.JsonReader',
         'GeoExt.Version'
    ],
    idProperty: "filter",
    fields: [{
        name: "symbolizers",
        mapping: function(v) {
            return {
                fillColor: v.color,
                fillOpacity: v.opacity,
                stroke: false
            };
        },
        defaultValue: null
    }, {
        name: "filter",
        mapping: "quantity",
        type: "float",
        sortType: 'asFloat',
        sortDir: 'ASC'
    }, {
        name: "label",
        mapping: function(v) {
            // fill label with quantity if empty
            return v.label || v.quantity;
        }
    }],
    proxy: {
        type : 'memory',
        // TODO GeoExt is not defined on construction so we're checking the
        //      ExtJS-Version without GeoExt.isExt4. Maybe this can be
        //      improved/beautified
        reader: (function(){
            if (Ext.versions.extjs.major > 4) {
                return {
                    type: 'json',
                    rootProperty: 'colorMap'
                }
            } else {
                return {
                    type: 'json',
                    root: 'colorMap'
                }
            }
        })()
    },
    listeners:{
        // TODO cleanup when ExtJS4-Support is no longer needed
        //      removed in ExtJS5
        idchanged:function(rec){
            for(var i=0;i<rec.stores.length;i++){
                var store = rec.stores[i];
                store.sort();
            }
        }
    }
});
{'fraction_non_alphanumeric': 0.11545711592836946, 'fraction_numerical': 0.006597549481621112, 'mean_word_length': 1.4766627771295215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7040775', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1180, 'n_words': 299}