function schema
%SCHEMA  Defines properties for @exclusion class
%
% Author(s): James G. Owen
% Revised:
% Copyright 1986-2001 The MathWorks, Inc.
% $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:38:22 $

%% Class overloaded to add logical combination operators

% Register class (subclass)
c = schema.class(findpackage('tsguis'),'exclusion');

%% Define logicSelectionMode type
if isempty(findtype('logicSelectionMode'))
    schema.EnumType('logicSelectionMode', {'and', 'or'});
end

%% Public attributes
%% Logical selection mode
p = schema.prop(c, 'BoundsLogicalOp', 'logicSelectionMode');
p.FactoryValue = 'or';
p = schema.prop(c, 'OutliersLogicalOp', 'logicSelectionMode');
p.FactoryValue = 'or';
p = schema.prop(c, 'FlatlineLogicalOp', 'logicSelectionMode');
p.FactoryValue = 'or';
p = schema.prop(c, 'ExpressionLogicalOp', 'logicSelectionMode');
p.FactoryValue = 'or';

%% Rule status
p = schema.prop(c, 'Boundsposition','MATLAB array');
p.FactoryValue = 1;
p = schema.prop(c, 'Outliersposition','MATLAB array');
p.FactoryValue = 2;
p = schema.prop(c, 'Flatlineposition','MATLAB array');
p.FactoryValue = 3;
p = schema.prop(c, 'Expressionposition','MATLAB array');
p.FactoryValue = 4;

%% Rule characteristics
p = schema.prop(c, 'Xlow', 'MATLAB array');
p.Description = 'time lower bound';
p = schema.prop(c, 'Xlowstrict', 'on/off');
p.FactoryValue = 'off';
p = schema.prop(c,'Xhigh', 'MATLAB array');
p.Description = 'time upper bound';
p = schema.prop(c, 'Xhighstrict', 'on/off');
p.FactoryValue = 'off';
if isempty(findtype('TimeUnits'))
    schema.EnumType('TimeUnits', {'years', 'weeks', 'days', 'hours', ...
        'mins', 'secs'});
end
p = schema.prop(c,'XUnits','TimeUnits');
p.FactoryValue = 'secs';
p = schema.prop(c, 'Ylow', 'MATLAB array');
p.Description = 'data lower bound';
p = schema.prop(c, 'Ylowstrict', 'on/off');
p.FactoryValue = 'off';
p = schema.prop(c, 'Yhigh', 'MATLAB array');
p.Description = 'data upper bound';
p = schema.prop(c, 'Yhighstrict', 'on/off');
p.FactoryValue = 'off';
p = schema.prop(c, 'Outlierwindow', 'MATLAB array');
p.Description = 'outlier window length';
p = schema.prop(c, 'Outlierconf', 'MATLAB array');
p.Description = 'outlier detection confidence limit';
p = schema.prop(c, 'Mexpression', 'string');
p.Description = 'MATLAB expression';
p = schema.prop(c, 'Flatlinelength', 'MATLAB array');
p.Description = 'mimimum flatline length';

p = schema.prop(c, 'Listeners', 'MATLAB array');
% p.AccessFlags.PublicGet = 'off';
% p.AccessFlags.PublicSet = 'off';

%% Rulechanged event
schema.event(c,'rulechange');