source: mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_observation/ceda_observation.py @ 8086

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

Fixed the multiple CI_Party INSERT in the DB
Refactored the ingestion thanks to the new eq method in the imported classes DB library

Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18from ea_model.moles3_4.observation.mo_observation import  MO_Observation
19
20'''
21Created on 03-Feb-2012 10:41:16
22
23@author: mnagni
24'''
25
26class CEDA_Observation(MO_Observation):
27    '''
28        Represents a data entity defined in a UML diagram and supposed to
29        be persisted in a relational database.
30 
31        This class has been genererated automatically using the Apache Velocity project.
32    '''
33    '''
34        Please note that any access to the inner attributes should be done using
35        the given get/set methods and NOT accessing them directly.
36    '''
37    def __init__(self):
38        self._mo_observation = MO_Observation()         
39
40        self.resolution = None
41        self._geographicExtent_ex_boundingpolygon = []
42        self._geographicExtent_ex_geographicboundingbox = []
43        self._geographicExtent_ex_geographicdescription = []
44        self.relatedParty = []
45        self._permission_md_legalconstraints = None
46        self._permission_md_securityconstraints = None
47        self.resultTime = None
48        self._observedProperty_gf_operation = None
49        self._observedProperty_gf_associationrole = None
50        self._observedProperty_gf_attributetype = None
51        self.resultAccumulation = None
52        self.parameter = []
53        self.publicationState = None
54        self.identifier = []
55        self.metadata = None
56        self.dataLineage = None
57        self._phenomenonTime_tm_complex = None
58        self._phenomenonTime_tm_primitive = None
59        self.documentation = []
60        self._resultQuality_dq_positionalaccuracy = []
61        self._resultQuality_dq_logicalconsistency = []
62        self._resultQuality_dq_temporalaccuracy = []
63        self._resultQuality_dq_completeness = []
64        self._resultQuality_qe_usability = []
65        self._resultQuality_dq_thematicaccuracy = []
66        self.validTime = None
67        self.procedure = None
68        self.result = None
69        self.verticalExtent = []
70        self.inSupportOf = None
71        self.citation = []
72        self.internalReview = []
73        self._featureOfInterest_gfi_domainfeature = None
74        self._featureOfInterest_mo_featureofinterest = None
75        self._featureOfInterest_sf_samplingfeature = None
76        self.status = None
77        self.keywords = []
78        self._relatedObservation_om_measurement = []
79        self._relatedObservation_om_discretecoverageobservation = []
80        self._relatedObservation_om_geometryobservation = []
81        self._relatedObservation_om_complexobservation = []
82        self._relatedObservation_om_countobservation = []
83        self._relatedObservation_om_categoryobservation = []
84        self._relatedObservation_om_truthobservation = []
85        self._relatedObservation_om_temporalobservation = []
86        self._relatedObservation_mo_observation = []
87        self.description = None
88        super(CEDA_Observation, self).__init__()
89
90    @property
91    def resolution(self):
92        return self._mo_observation.resolution
93
94    @resolution.setter
95    def resolution(self, value):
96            self._mo_observation.resolution = value
97
98    @property
99    def geographicExtent(self):
100        return self._mo_observation.geographicExtent
101
102    @geographicExtent.setter
103    def geographicExtent(self, value):
104            self._mo_observation.geographicExtent = value
105
106    @property
107    def relatedParty(self):
108        return self._mo_observation.relatedParty
109
110    @relatedParty.setter
111    def relatedParty(self, value):
112            self._mo_observation.relatedParty = value
113
114    @property
115    def permission(self):
116        return self._mo_observation.permission
117
118    @permission.setter
119    def permission(self, value):
120            self._mo_observation.permission = value
121
122    @property
123    def resultTime(self):
124        return self._mo_observation.resultTime
125
126    @resultTime.setter
127    def resultTime(self, value):
128            self._mo_observation.resultTime = value
129
130    @property
131    def observedProperty(self):
132        return self._mo_observation.observedProperty
133
134    @observedProperty.setter
135    def observedProperty(self, value):
136            self._mo_observation.observedProperty = value
137
138    @property
139    def resultAccumulation(self):
140        return self._mo_observation.resultAccumulation
141
142    @resultAccumulation.setter
143    def resultAccumulation(self, value):
144            self._mo_observation.resultAccumulation = value
145
146    @property
147    def parameter(self):
148        return self._mo_observation.parameter
149
150    @parameter.setter
151    def parameter(self, value):
152            self._mo_observation.parameter = value
153
154    @property
155    def publicationState(self):
156        return self._mo_observation.publicationState
157
158    @publicationState.setter
159    def publicationState(self, value):
160            self._mo_observation.publicationState = value
161
162    @property
163    def identifier(self):
164        return self._mo_observation.identifier
165
166    @identifier.setter
167    def identifier(self, value):
168            self._mo_observation.identifier = value
169
170    @property
171    def metadata(self):
172        return self._mo_observation.metadata
173
174    @metadata.setter
175    def metadata(self, value):
176            self._mo_observation.metadata = value
177
178
179
180    @property
181    def phenomenonTime(self):
182        return self._mo_observation.phenomenonTime
183
184    @phenomenonTime.setter
185    def phenomenonTime(self, value):
186            self._mo_observation.phenomenonTime = value
187
188    @property
189    def documentation(self):
190        return self._mo_observation.documentation
191
192    @documentation.setter
193    def documentation(self, value):
194            self._mo_observation.documentation = value
195
196    @property
197    def resultQuality(self):
198        return self._mo_observation.resultQuality
199
200    @resultQuality.setter
201    def resultQuality(self, value):
202            self._mo_observation.resultQuality = value
203
204    @property
205    def validTime(self):
206        return self._mo_observation.validTime
207
208    @validTime.setter
209    def validTime(self, value):
210            self._mo_observation.validTime = value
211
212    @property
213    def procedure(self):
214        return self._mo_observation.procedure
215
216    @procedure.setter
217    def procedure(self, value):
218            self._mo_observation.procedure = value
219
220    @property
221    def result(self):
222        return self._mo_observation.result
223
224    @result.setter
225    def result(self, value):
226            self._mo_observation.result = value
227
228    @property
229    def verticalExtent(self):
230        return self._mo_observation.verticalExtent
231
232    @verticalExtent.setter
233    def verticalExtent(self, value):
234            self._mo_observation.verticalExtent = value
235
236    @property
237    def inSupportOf(self):
238        return self._mo_observation.inSupportOf
239
240    @inSupportOf.setter
241    def inSupportOf(self, value):
242            self._mo_observation.inSupportOf = value
243
244
245
246
247
248    @property
249    def featureOfInterest(self):
250        return self._mo_observation.featureOfInterest
251
252    @featureOfInterest.setter
253    def featureOfInterest(self, value):
254            self._mo_observation.featureOfInterest = value
255
256    @property
257    def status(self):
258        return self._mo_observation.status
259
260    @status.setter
261    def status(self, value):
262            self._mo_observation.status = value
263
264
265
266    @property
267    def relatedObservation(self):
268        return self._mo_observation.relatedObservation
269
270    @relatedObservation.setter
271    def relatedObservation(self, value):
272            self._mo_observation.relatedObservation = value
273
274    @property
275    def description(self):
276        return self._mo_observation.description
277
278    @description.setter
279    def description(self, value):
280            self._mo_observation.description = value
281
282    def __key(self):
283        return (self.resolution, self.geographicExtent, self.relatedParty, self.permission, self.resultTime, self.observedProperty, self.resultAccumulation, self.parameter, self.publicationState, self.identifier, self.metadata, self.dataLineage, self.phenomenonTime, self.documentation, self.resultQuality, self.validTime, self.procedure, self.result, self.verticalExtent, self.inSupportOf, self.citation, self.internalReview, self.featureOfInterest, self.status, self.keywords, self.relatedObservation, self.description)
284
285    def __eq__(x, y):
286        '''
287        Cannot compare classes which do not define a "__key" attribute
288        '''
289        if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
290            return x.__key() == y.__key()
291        return id(x) == id(y)
292
293    def __hash__(self):
294        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.