classdef firingRateMaps < types.core.LabMetaData & types.untyped.GroupClass
% FIRINGRATEMAPS A group of firing rate maps


% PROPERTIES
properties
    firingratemap; % Firing rate map attributes
end

methods
    function obj = firingRateMaps(varargin)
        % FIRINGRATEMAPS Constructor for firingRateMaps
        %     obj = FIRINGRATEMAPS(parentname1,parentvalue1,..,parentvalueN,parentargN,name1,value1,...,nameN,valueN)
        % firingratemap = firingRateMap
        obj = obj@types.core.LabMetaData(varargin{:});
        [obj.firingratemap, ivarargin] = types.util.parseConstrained(obj,'firingratemap', 'types.ndx_cell_explorer.firingRateMap', varargin{:});
        varargin(ivarargin) = [];
        
        p = inputParser;
        p.KeepUnmatched = true;
        p.PartialMatching = false;
        p.StructExpand = false;
        misc.parseSkipInvalidName(p, varargin);
        if strcmp(class(obj), 'types.ndx_cell_explorer.firingRateMaps')
            types.util.checkUnset(obj, unique(varargin(1:2:end)));
        end
    end
    %% SETTERS
    function obj = set.firingratemap(obj, val)
        obj.firingratemap = obj.validate_firingratemap(val);
    end
    %% VALIDATORS
    
    function val = validate_firingratemap(obj, val)
        constrained = {'types.ndx_cell_explorer.firingRateMap'};
        types.util.checkSet('firingratemap', struct(), constrained, val);
    end
    %% EXPORT
    function refs = export(obj, fid, fullpath, refs)
        refs = export@types.core.LabMetaData(obj, fid, fullpath, refs);
        if any(strcmp(refs, fullpath))
            return;
        end
        if ~isempty(obj.firingratemap)
            refs = obj.firingratemap.export(fid, fullpath, refs);
        end
    end
end

end