source: mauRepo/MolesManager/trunk/src/ea_model/iso_19135_2005_procedures_for_registration/re_clarificationinformation.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_clarificationinformation.py@8197
Revision 8197, 7.1 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_proposalmanagementinformation import  RE_ProposalManagementInformation
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 30-Mar-2012 16:45:24
26
27@author: mnagni
28'''
29
30class RE_ClarificationInformation(RE_ProposalManagementInformation):
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_proposalmanagementinformation = RE_ProposalManagementInformation()     
43
44        self.controlBodyNotes = None
45        self._item_cl_classificationruleitem = None
46        self._item_re_subregisterdescription = None
47        self._item_cl_classificationlegenditem = None
48        self._item_cl_classificationlegenditem = None
49        self._item_cl_classificationruleitem = None
50        self.sponsor = None
51        self.dateDisposed = None
52        self.disposition = None
53        self.status = None
54        self.dateProposed = None
55        self.proposedChange = None
56        self.registerManagerNotes = None
57        self.controlBodyDecisionEvent = None
58        self.justification = None
59        super(RE_ClarificationInformation, self).__init__()
60
61    @property
62    def controlBodyNotes(self): 
63        return self._re_proposalmanagementinformation.controlBodyNotes
64
65    @controlBodyNotes.setter
66    def controlBodyNotes(self, value): 
67            self._re_proposalmanagementinformation.controlBodyNotes = value
68
69    @property
70    def item(self):     
71        if(has_value(self._item_cl_classificationruleitem)):
72            return self._item_cl_classificationruleitem
73        if(has_value(self._item_re_subregisterdescription)):
74            return self._item_re_subregisterdescription
75        if(has_value(self._item_cl_classificationlegenditem)):
76            return self._item_cl_classificationlegenditem
77        if(has_value(self._item_cl_classificationlegenditem)):
78            return self._item_cl_classificationlegenditem
79        if(has_value(self._item_cl_classificationruleitem)):
80            return self._item_cl_classificationruleitem
81        return  None
82
83    @item.setter
84    def item(self, value):     
85        valueClass = "%s.%s" % (type(value).__module__,type(value).__name__)
86        if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationruleitem.CL_ClassificationRuleItem":
87            self._item_cl_classificationruleitem = value
88            self._item_re_subregisterdescription = None
89            self._item_cl_classificationlegenditem = None
90            self._item_cl_classificationlegenditem = None
91            self._item_cl_classificationruleitem = None
92        if valueClass == "ea_model.iso_19135_2005_procedures_for_registration.re_subregisterdescription.RE_SubregisterDescription":
93            self._item_re_subregisterdescription = value
94            self._item_cl_classificationruleitem = None
95            self._item_cl_classificationlegenditem = None
96            self._item_cl_classificationlegenditem = None
97            self._item_cl_classificationruleitem = None
98        if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationlegenditem.CL_ClassificationLegendItem":
99            self._item_cl_classificationlegenditem = value
100            self._item_cl_classificationruleitem = None
101            self._item_re_subregisterdescription = None
102            self._item_cl_classificationlegenditem = None
103            self._item_cl_classificationruleitem = None
104        if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationlegenditem.CL_ClassificationLegendItem":
105            self._item_cl_classificationlegenditem = value
106            self._item_cl_classificationruleitem = None
107            self._item_re_subregisterdescription = None
108            self._item_cl_classificationlegenditem = None
109            self._item_cl_classificationruleitem = None
110        if valueClass == "ea_model.iso_19144_1_classification_systems.cl_classificationruleitem.CL_ClassificationRuleItem":
111            self._item_cl_classificationruleitem = value
112            self._item_cl_classificationruleitem = None
113            self._item_re_subregisterdescription = None
114            self._item_cl_classificationlegenditem = None
115            self._item_cl_classificationlegenditem = None
116
117    @property
118    def sponsor(self): 
119        return self._re_proposalmanagementinformation.sponsor
120
121    @sponsor.setter
122    def sponsor(self, value):   
123            self._re_proposalmanagementinformation.sponsor = value
124
125    @property
126    def dateDisposed(self):     
127        return self._re_proposalmanagementinformation.dateDisposed
128
129    @dateDisposed.setter
130    def dateDisposed(self, value):     
131            self._re_proposalmanagementinformation.dateDisposed = value
132
133    @property
134    def disposition(self):     
135        return self._re_proposalmanagementinformation.disposition
136
137    @disposition.setter
138    def disposition(self, value):       
139            self._re_proposalmanagementinformation.disposition = value
140
141    @property
142    def status(self):   
143        return self._re_proposalmanagementinformation.status
144
145    @status.setter
146    def status(self, value):   
147            self._re_proposalmanagementinformation.status = value
148
149    @property
150    def dateProposed(self):     
151        return self._re_proposalmanagementinformation.dateProposed
152
153    @dateProposed.setter
154    def dateProposed(self, value):     
155            self._re_proposalmanagementinformation.dateProposed = value
156
157    @property
158    def registerManagerNotes(self):     
159        return self._re_proposalmanagementinformation.registerManagerNotes
160
161    @registerManagerNotes.setter
162    def registerManagerNotes(self, value):     
163            self._re_proposalmanagementinformation.registerManagerNotes = value
164
165    @property
166    def controlBodyDecisionEvent(self): 
167        return self._re_proposalmanagementinformation.controlBodyDecisionEvent
168
169    @controlBodyDecisionEvent.setter
170    def controlBodyDecisionEvent(self, value): 
171            self._re_proposalmanagementinformation.controlBodyDecisionEvent = value
172
173    @property
174    def justification(self):   
175        return self._re_proposalmanagementinformation.justification
176
177    @justification.setter
178    def justification(self, value):     
179            self._re_proposalmanagementinformation.justification = value
180
181    def __key(self):
182        return (self.controlBodyNotes, self.item, self.sponsor, self.dateDisposed, self.disposition, self.status, self.dateProposed, self.proposedChange, self.registerManagerNotes, self.controlBodyDecisionEvent, self.justification)
183
184    def __eq__(self, y):
185        if type(self) != type(y):
186            return False
187        '''
188        Cannot compare classes which do not define a "__key" attribute
189        '''
190        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
191            return self.__key() == y.__key()
192        return id(self) == id(y)
193
194    def __hash__(self):
195        return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.