Home > classes > @ltpda_uo > ltpda_uo.m

ltpda_uo

PURPOSE ^

LTPDA_UO is the abstract ltpda base class for ltpda user object classes.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 LTPDA_UO is the abstract ltpda base class for ltpda user object classes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: LTPDA_UO is the ltpda base class for ltpda user object classes.
              This class is an abstract class and it is not possible to create
              an instance of this class.
              ALL ltpda user object classes inherit this 'abstract' class.

 SUPER CLASSES: ltpda_obj

 SUB CLASSES:   ltpda_uoh, plist

 PROPERTIES:

     Inherit Properties (read only)
       version  - cvs-version string.

     Protected Properties (read only)
       name     - name of object
       created  - creation time (time-object)
       creator  - contains a instance of the provenance class.

 LTPDA_UO Methods:

     Public Methods
       setName    - set the property 'name'
       save       - save ltpda user objects
       submit     - submits the given collection of objects to an LTPDA Repository.

     Protected Methods
       setCreated - set the property 'created'
       setCreator - set the property 'creator'

     Static Methods
       retrieve   - retrieve ltpda objects with given ids from the repository

     Abstract Methods
       string     - writes a command string that can be used to recreate the object

 M-FILE INFO: The following call returns an minfo object that contains
              information about the ltpda_uo constructor:
                   >> info = ltpda_uo.getInfo
              or   >> info = ltpda_uo.getInfo('ltpda_uo')

 VERSION:     $Id: ltpda_uo.m,v 1.20 2008/08/22 14:09:09 ingo Exp $

 HISTORY:     19-05-2008 Diepholz
                 Creation.

 SEE ALSO: ltpda_obj, ltpda_uoh, plist

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % LTPDA_UO is the abstract ltpda base class for ltpda user object classes.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: LTPDA_UO is the ltpda base class for ltpda user object classes.
0005 %              This class is an abstract class and it is not possible to create
0006 %              an instance of this class.
0007 %              ALL ltpda user object classes inherit this 'abstract' class.
0008 %
0009 % SUPER CLASSES: ltpda_obj
0010 %
0011 % SUB CLASSES:   ltpda_uoh, plist
0012 %
0013 % PROPERTIES:
0014 %
0015 %     Inherit Properties (read only)
0016 %       version  - cvs-version string.
0017 %
0018 %     Protected Properties (read only)
0019 %       name     - name of object
0020 %       created  - creation time (time-object)
0021 %       creator  - contains a instance of the provenance class.
0022 %
0023 % LTPDA_UO Methods:
0024 %
0025 %     Public Methods
0026 %       setName    - set the property 'name'
0027 %       save       - save ltpda user objects
0028 %       submit     - submits the given collection of objects to an LTPDA Repository.
0029 %
0030 %     Protected Methods
0031 %       setCreated - set the property 'created'
0032 %       setCreator - set the property 'creator'
0033 %
0034 %     Static Methods
0035 %       retrieve   - retrieve ltpda objects with given ids from the repository
0036 %
0037 %     Abstract Methods
0038 %       string     - writes a command string that can be used to recreate the object
0039 %
0040 % M-FILE INFO: The following call returns an minfo object that contains
0041 %              information about the ltpda_uo constructor:
0042 %                   >> info = ltpda_uo.getInfo
0043 %              or   >> info = ltpda_uo.getInfo('ltpda_uo')
0044 %
0045 % VERSION:     $Id: ltpda_uo.m,v 1.20 2008/08/22 14:09:09 ingo Exp $
0046 %
0047 % HISTORY:     19-05-2008 Diepholz
0048 %                 Creation.
0049 %
0050 % SEE ALSO: ltpda_obj, ltpda_uoh, plist
0051 %
0052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0053 
0054 classdef ltpda_uo < ltpda_obj
0055 
0056 
0057   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0058   %                            Property definition                            %
0059   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0060 
0061   %---------- Public (read/write) Properties  ----------
0062   properties
0063   end
0064 
0065   %---------- Protected read-only Properties ----------
0066   properties (SetAccess = protected)
0067     name    = 'none';
0068     created = time(0);
0069     creator = provenance();
0070   end
0071 
0072   %---------- Private Properties ----------
0073   properties (GetAccess = protected, SetAccess = protected)
0074   end
0075 
0076   %---------- Abstract Properties ----------
0077   properties (Abstract = true, SetAccess = protected)
0078   end
0079 
0080   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0081   %                          Check property setting                           %
0082   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0083 
0084   methods
0085     function obj = set.created(obj, val)
0086       if ~(isa(val, 'time') || isempty(val))
0087         error('### The value for the property ''created'' must be a time-object or empty.');
0088       end
0089       obj.created = val;
0090     end
0091     function obj = set.name(obj, val)
0092       if ~ischar(val)
0093         error('### The value for the property ''name'' must be a string.');
0094       end
0095       obj.name = val;
0096     end
0097     function obj = set.creator(obj, val)
0098       if ~isa(val, 'provenance')
0099         error('### The value for the property ''creator'' must be a provenance-object.');
0100       end
0101       obj.creator = val;
0102     end
0103   end
0104 
0105   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0106   %                                Constructor                                %
0107   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0108 
0109   methods
0110     function obj = ltpda_uo(varargin)
0111 
0112       %%% Call superclass
0113       obj = obj@ltpda_obj(varargin{:});
0114 
0115       %%%%%%%%%%   Set dafault values   %%%%%%%%%%
0116       %%% Exept for a struct as an input
0117       if ~(nargin == 1 && isstruct(varargin{1}))
0118         % Set version
0119         obj.prependVersion('$Id: ltpda_uo.m,v 1.20 2008/08/22 14:09:09 ingo Exp $');
0120 
0121         % Set created time
0122         obj.setCreated(time());
0123       end
0124 
0125       if nargin == 1
0126 
0127         if isstruct(varargin{1})
0128           %%%%%%%%%%   obj = ltpda_uo(struct)   %%%%%%%%%%
0129 
0130           %%% Set properties which are declared in this class
0131           uo_struct = varargin{1};
0132 
0133           obj.name    = uo_struct.name;
0134           obj.created = utils.helper.struct2obj(uo_struct.created, 'time');
0135           obj.creator = utils.helper.struct2obj(uo_struct.creator, 'provenance');
0136         end
0137 
0138       end
0139     end
0140 
0141   end
0142 
0143   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0144   %                              Methods (public)                             %
0145   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0146 
0147   methods
0148     varargout = setName(varargin)
0149     varargout = save(varargin)
0150   end
0151 
0152   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0153   %                              Methods (protected)                          %
0154   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0155 
0156   methods (Access = protected)
0157     varargout = setCreated(obj, val)
0158     varargout = setCreator(obj, val)
0159   end
0160 
0161   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0162   %                              Methods (private)                             %
0163   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0164 
0165   methods (Access = protected)
0166   end
0167 
0168   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0169   %                              Methods (static)                             %
0170   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0171 
0172   methods (Static)
0173 
0174     varargout = retrieve(varargin)
0175     varargout = submit(varargin)
0176 
0177     function ii = getInfo(varargin)
0178       ii = utils.helper.generic_getInfo(varargin{:}, 'ltpda_uo');
0179     end
0180 
0181     function out = VEROUT()
0182       out = '$Id: ltpda_uo.m,v 1.20 2008/08/22 14:09:09 ingo Exp $';
0183     end
0184 
0185     function out = SETS()
0186       out = {};
0187     end
0188 
0189     function out = getDefaultPlist()
0190       out = [];
0191     end
0192 
0193   end
0194 
0195   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0196   %                              Methods (abstract)                           %
0197   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0198 
0199   methods (Abstract)
0200     cmd = string(obj, varargin)
0201   end
0202 
0203 end
0204 
0205

Generated on Mon 25-Aug-2008 22:39:29 by m2html © 2003