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