source: mauRepo/MolesManager/trunk/src/ea_model/iso_19156_2011_observations_and_measurements/observation_schema/coverageobservation/om_discretecoverageobservation.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19156_2011_observations_and_measurements/observation_schema/coverageobservation/om_discretecoverageobservation.py@8091
Revision 8091, 9.4 KB checked in by mnagni, 8 years ago (diff)

The migration process now includes
1) deployment_data files
2) XML document hash
3) full Dojo support


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_19156_2011_observations_and_measurements.observation_schema.observation.om_observation import  OM_Observation
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:09
26
27@author: mnagni
28'''
29
30class OM_DiscreteCoverageObservation(OM_Observation):
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._om_observation = OM_Observation()         
43
44        self.metadata = None
45        self._featureOfInterest_sf_samplingfeature = None
46        self._featureOfInterest_mo_featureofinterest = None
47        self._featureOfInterest_gfi_domainfeature = None
48        self._procedure_ceda_compositeprocess = None
49        self._procedure_ceda_acquisition = None
50        self._procedure_ceda_processing = None
51        self._relatedObservation_om_discretecoverageobservation = []
52        self._relatedObservation_om_temporalobservation = []
53        self._relatedObservation_om_measurement = []
54        self._relatedObservation_mo_observation = []
55        self._relatedObservation_om_truthobservation = []
56        self._relatedObservation_om_countobservation = []
57        self._relatedObservation_om_categoryobservation = []
58        self._relatedObservation_om_geometryobservation = []
59        self._relatedObservation_om_complexobservation = []
60        self._phenomenonTime_tm_primitive = None
61        self._phenomenonTime_tm_complex = None
62        self.result = None
63        self._result_cv_discretegridpointcoverage = None
64        self._result_cvt_discretetimeinstantcoverage = None
65        self._result_cv_discretesurfacecoverage = None
66        self._result_cv_discretecurvecoverage = None
67        self._result_cv_discretepointcoverage = None
68        self._result_cv_discretesolidcoverage = None
69        self.resultTime = None
70        self.validTime = None
71        self._resultQuality_dq_logicalconsistency = []
72        self._resultQuality_dq_thematicaccuracy = []
73        self._resultQuality_qe_usability = []
74        self._resultQuality_dq_completeness = []
75        self._resultQuality_dq_positionalaccuracy = []
76        self._resultQuality_dq_temporalaccuracy = []
77        self._observedProperty_gf_attributetype = None
78        self._observedProperty_gf_associationrole = None
79        self._observedProperty_gf_operation = None
80        self.parameter = []
81        super(OM_DiscreteCoverageObservation, self).__init__()
82
83    @property
84    def metadata(self): 
85        return self._om_observation.metadata
86
87    @metadata.setter
88    def metadata(self, value): 
89            self._om_observation.metadata = value
90
91    @property
92    def featureOfInterest(self):       
93        return self._om_observation.featureOfInterest
94
95    @featureOfInterest.setter
96    def featureOfInterest(self, value): 
97            self._om_observation.featureOfInterest = value
98
99    @property
100    def procedure(self):       
101        return self._om_observation.procedure
102
103    @procedure.setter
104    def procedure(self, value): 
105            self._om_observation.procedure = value
106
107    @property
108    def relatedObservation(self):       
109        return self._om_observation.relatedObservation
110
111    @relatedObservation.setter
112    def relatedObservation(self, value):       
113            self._om_observation.relatedObservation = value
114
115    @property
116    def phenomenonTime(self):   
117        return self._om_observation.phenomenonTime
118
119    @phenomenonTime.setter
120    def phenomenonTime(self, value):   
121            self._om_observation.phenomenonTime = value
122
123    @property
124    def result(self):   
125        return self._om_observation.result
126
127    @result.setter
128    def result(self, value):   
129            self._om_observation.result = value
130
131    @property
132    def result(self):   
133        if(has_value(self._result_cv_discretegridpointcoverage)):
134            return self._result_cv_discretegridpointcoverage
135        if(has_value(self._result_cvt_discretetimeinstantcoverage)):
136            return self._result_cvt_discretetimeinstantcoverage
137        if(has_value(self._result_cv_discretesurfacecoverage)):
138            return self._result_cv_discretesurfacecoverage
139        if(has_value(self._result_cv_discretecurvecoverage)):
140            return self._result_cv_discretecurvecoverage
141        if(has_value(self._result_cv_discretepointcoverage)):
142            return self._result_cv_discretepointcoverage
143        if(has_value(self._result_cv_discretesolidcoverage)):
144            return self._result_cv_discretesolidcoverage
145        return  None
146
147    @result.setter
148    def result(self, value):   
149        valueClass = "%s.%s" % (type(value).__module__,type(value).__name__)
150        if valueClass == "ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_discretegridpointcoverage.CV_DiscreteGridPointCoverage":
151            self._result_cv_discretegridpointcoverage = value
152            self._result_cvt_discretetimeinstantcoverage = None
153            self._result_cv_discretesurfacecoverage = None
154            self._result_cv_discretecurvecoverage = None
155            self._result_cv_discretepointcoverage = None
156            self._result_cv_discretesolidcoverage = None
157        if valueClass == "ea_model.iso_19156_2011_observations_and_measurements.temporal_coverage.cvt_discretetimeinstantcoverage.CVT_DiscreteTimeInstantCoverage":
158            self._result_cvt_discretetimeinstantcoverage = value
159            self._result_cv_discretegridpointcoverage = None
160            self._result_cv_discretesurfacecoverage = None
161            self._result_cv_discretecurvecoverage = None
162            self._result_cv_discretepointcoverage = None
163            self._result_cv_discretesolidcoverage = None
164        if valueClass == "ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_discretesurfacecoverage.CV_DiscreteSurfaceCoverage":
165            self._result_cv_discretesurfacecoverage = value
166            self._result_cv_discretegridpointcoverage = None
167            self._result_cvt_discretetimeinstantcoverage = None
168            self._result_cv_discretecurvecoverage = None
169            self._result_cv_discretepointcoverage = None
170            self._result_cv_discretesolidcoverage = None
171        if valueClass == "ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_discretecurvecoverage.CV_DiscreteCurveCoverage":
172            self._result_cv_discretecurvecoverage = value
173            self._result_cv_discretegridpointcoverage = None
174            self._result_cvt_discretetimeinstantcoverage = None
175            self._result_cv_discretesurfacecoverage = None
176            self._result_cv_discretepointcoverage = None
177            self._result_cv_discretesolidcoverage = None
178        if valueClass == "ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_discretepointcoverage.CV_DiscretePointCoverage":
179            self._result_cv_discretepointcoverage = value
180            self._result_cv_discretegridpointcoverage = None
181            self._result_cvt_discretetimeinstantcoverage = None
182            self._result_cv_discretesurfacecoverage = None
183            self._result_cv_discretecurvecoverage = None
184            self._result_cv_discretesolidcoverage = None
185        if valueClass == "ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_discretesolidcoverage.CV_DiscreteSolidCoverage":
186            self._result_cv_discretesolidcoverage = value
187            self._result_cv_discretegridpointcoverage = None
188            self._result_cvt_discretetimeinstantcoverage = None
189            self._result_cv_discretesurfacecoverage = None
190            self._result_cv_discretecurvecoverage = None
191            self._result_cv_discretepointcoverage = None
192
193    @property
194    def resultTime(self):       
195        return self._om_observation.resultTime
196
197    @resultTime.setter
198    def resultTime(self, value):       
199            self._om_observation.resultTime = value
200
201    @property
202    def validTime(self):       
203        return self._om_observation.validTime
204
205    @validTime.setter
206    def validTime(self, value): 
207            self._om_observation.validTime = value
208
209    @property
210    def resultQuality(self):   
211        return self._om_observation.resultQuality
212
213    @resultQuality.setter
214    def resultQuality(self, value):     
215            self._om_observation.resultQuality = value
216
217    @property
218    def observedProperty(self): 
219        return self._om_observation.observedProperty
220
221    @observedProperty.setter
222    def observedProperty(self, value): 
223            self._om_observation.observedProperty = value
224
225    @property
226    def parameter(self):       
227        return self._om_observation.parameter
228
229    @parameter.setter
230    def parameter(self, value): 
231            self._om_observation.parameter = value
232
233    def __key(self):
234        return (self.metadata, self.featureOfInterest, self.procedure, self.relatedObservation, self.phenomenonTime, self.result, self.result, self.resultTime, self.validTime, self.resultQuality, self.observedProperty, self.parameter)
235
236    def __eq__(self, y):
237        '''
238        Cannot compare classes which do not define a "__key" attribute
239        '''
240        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
241            return self.__key() == y.__key()
242        return id(self) == id(y)
243
244    def __hash__(self):
245        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.