source: mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_subregisterdescription.py @ 8197

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_subregisterdescription.py@8197
Revision 8197, 9.3 KB checked in by mnagni, 8 years ago (diff)

New database schema where URL class is a string and MO_Project.subProject use CEDA_Project as subType

Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21from ea_model.iso_19135_2005_procedures_for_registration.re_registeritem import  RE_RegisterItem
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 30-Mar-2012 16:45:23
26
27@author: mnagni
28'''
29
30class RE_SubregisterDescription(RE_RegisterItem):
31    '''
32        Represents a data entity defined in a UML diagram and supposed to
33        be persisted in a relational database.
34 
35        This class has been genererated automatically using the Apache Velocity project.
36    '''
37    '''
38        Please note that any access to the inner attributes should be done using
39        the given get/set methods and NOT accessing them directly.
40    '''
41    def __init__(self):
42        self._re_registeritem = RE_RegisterItem()       
43
44        self.additionInformation = []
45        self.alternativeExpressions = []
46        self._itemClass_cl_classificationlegendclass = None
47        self._itemClass_cl_classificationruleclass = None
48        self._itemClass_cl_classificationruleclass = None
49        self._itemClass_cl_classificationlegendclass = None
50        self._register_cl_classificationregister = []
51        self._register_cl_classificationregister = []
52        self.dateAmended = None
53        self.specificationLineage = []
54        self.subregisterManager = None
55        self._containedItemClass_cl_classificationlegendclass = []
56        self._containedItemClass_cl_classificationruleclass = []
57        self._containedItemClass_cl_classificationruleclass = []
58        self._containedItemClass_cl_classificationlegendclass = []
59        self._predecessor_cl_classificationruleitem = []
60        self._predecessor_re_subregisterdescription = []
61        self._predecessor_cl_classificationlegenditem = []
62        self._predecessor_cl_classificationlegenditem = []
63        self._predecessor_cl_classificationruleitem = []
64        self.itemIdentifier = None
65        self.fieldOfApplication = []
66        self.definition = None
67        self._successor_cl_classificationruleitem = []
68        self._successor_re_subregisterdescription = []
69        self._successor_cl_classificationlegenditem = []
70        self._successor_cl_classificationlegenditem = []
71        self._successor_cl_classificationruleitem = []
72        self.amendmentInformation = []
73        self.name = None
74        self.uniformResourceIdentifier = None
75        self.status = None
76        self.description = None
77        self.operatingLanguage = None
78        self.specificationSource = None
79        self.dateAccepted = None
80        self.clarificationInformation = []
81        super(RE_SubregisterDescription, self).__init__()
82
83    @property
84    def additionInformation(self):     
85        return self._re_registeritem.additionInformation
86
87    @additionInformation.setter
88    def additionInformation(self, value):       
89            self._re_registeritem.additionInformation = value
90
91    @property
92    def alternativeExpressions(self):   
93        return self._re_registeritem.alternativeExpressions
94
95    @alternativeExpressions.setter
96    def alternativeExpressions(self, value):   
97            self._re_registeritem.alternativeExpressions = value
98
99    @property
100    def itemClass(self):       
101        return self._re_registeritem.itemClass
102
103    @itemClass.setter
104    def itemClass(self, value): 
105            self._re_registeritem.itemClass = value
106
107    @property
108    def register(self): 
109        return self._re_registeritem.register
110
111    @register.setter
112    def register(self, value): 
113            self._re_registeritem.register = value
114
115    @property
116    def dateAmended(self):     
117        return self._re_registeritem.dateAmended
118
119    @dateAmended.setter
120    def dateAmended(self, value):       
121            self._re_registeritem.dateAmended = value
122
123    @property
124    def specificationLineage(self):     
125        return self._re_registeritem.specificationLineage
126
127    @specificationLineage.setter
128    def specificationLineage(self, value):     
129            self._re_registeritem.specificationLineage = value
130
131    @property
132    def containedItemClass(self):       
133        ret = []
134        for item in self._containedItemClass_cl_classificationlegendclass:
135            ret.append(item)
136        for item in self._containedItemClass_cl_classificationruleclass:
137            ret.append(item)
138        for item in self._containedItemClass_cl_classificationruleclass:
139            ret.append(item)
140        for item in self._containedItemClass_cl_classificationlegendclass:
141            ret.append(item)
142        return ret
143
144    @containedItemClass.setter
145    def containedItemClass(self, value):       
146        if isinstance(value, list):
147            self._containedItemClass_cl_classificationlegendclass[:]
148            self._containedItemClass_cl_classificationruleclass[:]
149            self._containedItemClass_cl_classificationruleclass[:]
150            self._containedItemClass_cl_classificationlegendclass[:]
151            for item in value:
152                valueClass = "%s.%s" % (type(item).__module__,type(item).__name__)
153                if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationlegendclass.CL_ClassificationLegendClass":
154                    self._containedItemClass_cl_classificationlegendclass.append(item)
155                    continue
156                if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationruleclass.CL_ClassificationRuleClass":
157                    self._containedItemClass_cl_classificationruleclass.append(item)
158                    continue
159                if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationruleclass.CL_ClassificationRuleClass":
160                    self._containedItemClass_cl_classificationruleclass.append(item)
161                    continue
162                if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationlegendclass.CL_ClassificationLegendClass":
163                    self._containedItemClass_cl_classificationlegendclass.append(item)
164                    continue
165
166    @property
167    def predecessor(self):     
168        return self._re_registeritem.predecessor
169
170    @predecessor.setter
171    def predecessor(self, value):       
172            self._re_registeritem.predecessor = value
173
174    @property
175    def itemIdentifier(self):   
176        return self._re_registeritem.itemIdentifier
177
178    @itemIdentifier.setter
179    def itemIdentifier(self, value):   
180            self._re_registeritem.itemIdentifier = value
181
182    @property
183    def fieldOfApplication(self):       
184        return self._re_registeritem.fieldOfApplication
185
186    @fieldOfApplication.setter
187    def fieldOfApplication(self, value):       
188            self._re_registeritem.fieldOfApplication = value
189
190    @property
191    def definition(self):       
192        return self._re_registeritem.definition
193
194    @definition.setter
195    def definition(self, value):       
196            self._re_registeritem.definition = value
197
198    @property
199    def successor(self):       
200        return self._re_registeritem.successor
201
202    @successor.setter
203    def successor(self, value): 
204            self._re_registeritem.successor = value
205
206    @property
207    def amendmentInformation(self):     
208        return self._re_registeritem.amendmentInformation
209
210    @amendmentInformation.setter
211    def amendmentInformation(self, value):     
212            self._re_registeritem.amendmentInformation = value
213
214    @property
215    def name(self):     
216        return self._re_registeritem.name
217
218    @name.setter
219    def name(self, value):     
220            self._re_registeritem.name = value
221
222    @property
223    def status(self):   
224        return self._re_registeritem.status
225
226    @status.setter
227    def status(self, value):   
228            self._re_registeritem.status = value
229
230    @property
231    def description(self):     
232        return self._re_registeritem.description
233
234    @description.setter
235    def description(self, value):       
236            self._re_registeritem.description = value
237
238    @property
239    def specificationSource(self):     
240        return self._re_registeritem.specificationSource
241
242    @specificationSource.setter
243    def specificationSource(self, value):       
244            self._re_registeritem.specificationSource = value
245
246    @property
247    def dateAccepted(self):     
248        return self._re_registeritem.dateAccepted
249
250    @dateAccepted.setter
251    def dateAccepted(self, value):     
252            self._re_registeritem.dateAccepted = value
253
254    @property
255    def clarificationInformation(self): 
256        return self._re_registeritem.clarificationInformation
257
258    @clarificationInformation.setter
259    def clarificationInformation(self, value): 
260            self._re_registeritem.clarificationInformation = value
261
262    def __key(self):
263        return (self.additionInformation, self.alternativeExpressions, self.itemClass, self.register, self.dateAmended, self.specificationLineage, self.subregisterManager, self.containedItemClass, self.predecessor, self.itemIdentifier, self.fieldOfApplication, self.definition, self.successor, self.amendmentInformation, self.name, self.uniformResourceIdentifier, self.status, self.description, self.operatingLanguage, self.specificationSource, self.dateAccepted, self.clarificationInformation)
264
265    def __eq__(self, y):
266        if type(self) != type(y):
267            return False
268        '''
269        Cannot compare classes which do not define a "__key" attribute
270        '''
271        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
272            return self.__key() == y.__key()
273        return id(self) == id(y)
274
275    def __hash__(self):
276        return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.