/// class ProspectDirector.Web.UI.FeatureSets.FeatureGroup

ProspectDirector.Web.UI.FeatureSets.FeatureGroup = Class.extend({

    //==============================
    // FIELDS
    //==============================

    _options: null,
    _features: null,

    //==============================
    // CONSTRUCTOR
    //==============================

    init: function (options) {
        this._options = options;
        this._fill(options.data);
    },

    //==============================
    // PROPERTIES
    //==============================

    get_data: function () {
        return this.get_options().data;
    },

    get_container: function () {
        return this.get_options().container;
    },

    get_domNode: function () {
        return this.get_container().children("[data-id=" + this.get_id() + "][data-role=feature-group]");
    },

    get_id: function () {
        return this.get_data().id;
    },

    get_name: function () {
        return this.get_data().name;
    },

    get_assembler: function () {
        return this.get_data().assembler;
    },

    get_options: function () {
        return this._options;
    },

    get_features: function () {
        return this._features;
    },

    get_featureSet: function () {
        return this.get_options().parent;
    },

    //==============================
    // PRIVATE METHODS
    //==============================

    _fill: function (data) {
        
        var index = 0,
            features = data.features;

        this._features = new ProspectDirector.Web.UI.FeatureSets.FeatureCollection({
            parent: this
        });

        for (index; index < features.length; index++) {
            this.get_features().add(new ProspectDirector.Web.UI.FeatureSets.Feature({
                parent: this,
                data: features[index]
            }));
        }

    }

});