source: mauRepo/MolesManager/trunk/src/ea_model/iso_19156_2011_observations_and_measurements/observation_schema/complexobservation/om_complexobservation.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/complexobservation/om_complexobservation.py@8091
Revision 8091, 5.0 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_ComplexObservation(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.resultTime = None
64        self.validTime = None
65        self._resultQuality_dq_logicalconsistency = []
66        self._resultQuality_dq_thematicaccuracy = []
67        self._resultQuality_qe_usability = []
68        self._resultQuality_dq_completeness = []
69        self._resultQuality_dq_positionalaccuracy = []
70        self._resultQuality_dq_temporalaccuracy = []
71        self._observedProperty_gf_attributetype = None
72        self._observedProperty_gf_associationrole = None
73        self._observedProperty_gf_operation = None
74        self.parameter = []
75        super(OM_ComplexObservation, self).__init__()
76
77    @property
78    def metadata(self): 
79        return self._om_observation.metadata
80
81    @metadata.setter
82    def metadata(self, value): 
83            self._om_observation.metadata = value
84
85    @property
86    def featureOfInterest(self):       
87        return self._om_observation.featureOfInterest
88
89    @featureOfInterest.setter
90    def featureOfInterest(self, value): 
91            self._om_observation.featureOfInterest = value
92
93    @property
94    def procedure(self):       
95        return self._om_observation.procedure
96
97    @procedure.setter
98    def procedure(self, value): 
99            self._om_observation.procedure = value
100
101    @property
102    def relatedObservation(self):       
103        return self._om_observation.relatedObservation
104
105    @relatedObservation.setter
106    def relatedObservation(self, value):       
107            self._om_observation.relatedObservation = value
108
109    @property
110    def phenomenonTime(self):   
111        return self._om_observation.phenomenonTime
112
113    @phenomenonTime.setter
114    def phenomenonTime(self, value):   
115            self._om_observation.phenomenonTime = value
116
117    @property
118    def resultTime(self):       
119        return self._om_observation.resultTime
120
121    @resultTime.setter
122    def resultTime(self, value):       
123            self._om_observation.resultTime = value
124
125    @property
126    def validTime(self):       
127        return self._om_observation.validTime
128
129    @validTime.setter
130    def validTime(self, value): 
131            self._om_observation.validTime = value
132
133    @property
134    def resultQuality(self):   
135        return self._om_observation.resultQuality
136
137    @resultQuality.setter
138    def resultQuality(self, value):     
139            self._om_observation.resultQuality = value
140
141    @property
142    def observedProperty(self): 
143        return self._om_observation.observedProperty
144
145    @observedProperty.setter
146    def observedProperty(self, value): 
147            self._om_observation.observedProperty = value
148
149    @property
150    def parameter(self):       
151        return self._om_observation.parameter
152
153    @parameter.setter
154    def parameter(self, value): 
155            self._om_observation.parameter = value
156
157    def __key(self):
158        return (self.metadata, self.featureOfInterest, self.procedure, self.relatedObservation, self.phenomenonTime, self.result, self.resultTime, self.validTime, self.resultQuality, self.observedProperty, self.parameter)
159
160    def __eq__(self, y):
161        '''
162        Cannot compare classes which do not define a "__key" attribute
163        '''
164        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
165            return self.__key() == y.__key()
166        return id(self) == id(y)
167
168    def __hash__(self):
169        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.