source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19156_2011_observations_and_measurements/observation_schema/timeseriesobservation/om_timeseriesobservation.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19156_2011_observations_and_measurements/observation_schema/timeseriesobservation/om_timeseriesobservation.py@8457
Revision 8457, 4.0 KB checked in by mnagni, 7 years ago (diff)

Corrected an error in the generation of the classes "synchronize" method.

  • Property svn:mime-type set to text/plain
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.coverageobservation.om_discretecoverageobservation import  OM_DiscreteCoverageObservation
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:11
26
27@author: mnagni
28'''
29
30class OM_TimeSeriesObservation(OM_DiscreteCoverageObservation):
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_discretecoverageobservation = OM_DiscreteCoverageObservation()         
43
44                self.metadata = None
45                self.featureOfInterest = None
46                self.procedure = None
47                self.phenomenonTime = None
48                self.result = None
49                self.result = None
50                self.resultTime = None
51                self.validTime = None
52                self.observedProperty = None
53                super(OM_TimeSeriesObservation, self).__init__()
54        @property
55        def metadata(self):     
56                return self._om_discretecoverageobservation.metadata
57
58        @metadata.setter
59        def metadata(self, value):     
60                        self._om_discretecoverageobservation.metadata = value
61        @property
62        def featureOfInterest(self):   
63                return self._om_discretecoverageobservation.featureOfInterest
64
65        @featureOfInterest.setter
66        def featureOfInterest(self, value):     
67                        self._om_discretecoverageobservation.featureOfInterest = value
68        @property
69        def procedure(self):   
70                return self._om_discretecoverageobservation.procedure
71
72        @procedure.setter
73        def procedure(self, value):     
74                        self._om_discretecoverageobservation.procedure = value
75        @property
76        def relatedObservation(self):   
77                return self._om_discretecoverageobservation.relatedObservation
78
79        @relatedObservation.setter
80        def relatedObservation(self, value):   
81                        self._om_discretecoverageobservation.relatedObservation = value
82        @property
83        def phenomenonTime(self):       
84                return self._om_discretecoverageobservation.phenomenonTime
85
86        @phenomenonTime.setter
87        def phenomenonTime(self, value):       
88                        self._om_discretecoverageobservation.phenomenonTime = value
89        @property
90        def result(self):       
91                return self._om_discretecoverageobservation.result
92
93        @result.setter
94        def result(self, value):       
95                        self._om_discretecoverageobservation.result = value
96        @property
97        def resultTime(self):   
98                return self._om_discretecoverageobservation.resultTime
99
100        @resultTime.setter
101        def resultTime(self, value):   
102                        self._om_discretecoverageobservation.resultTime = value
103        @property
104        def resultQuality(self):       
105                return self._om_discretecoverageobservation.resultQuality
106
107        @resultQuality.setter
108        def resultQuality(self, value):
109                        self._om_discretecoverageobservation.resultQuality = value
110        @property
111        def validTime(self):   
112                return self._om_discretecoverageobservation.validTime
113
114        @validTime.setter
115        def validTime(self, value):     
116                        self._om_discretecoverageobservation.validTime = value
117        @property
118        def observedProperty(self):     
119                return self._om_discretecoverageobservation.observedProperty
120
121        @observedProperty.setter
122        def observedProperty(self, value):     
123                        self._om_discretecoverageobservation.observedProperty = value
124        @property
125        def parameter(self):   
126                return self._om_discretecoverageobservation.parameter
127
128        @parameter.setter
129        def parameter(self, value):     
130                        self._om_discretecoverageobservation.parameter = value
131
132        def synchronize(self):
133                pass
134
135        def __key(self):
136                return (self.metadata, self.featureOfInterest, self.procedure, self.relatedObservation, self.phenomenonTime, self.result, self.result, self.resultTime, self.resultQuality, self.validTime, self.observedProperty, self.parameter)
137
138        def __eq__(self, y):
139                if type(self) != type(y):
140                        return False
141                '''
142                Cannot compare classes which do not define a "__key" attribute
143                '''
144                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
145                        return self.__key() == y.__key()
146                return id(self) == id(y)
147
148        def __hash__(self):
149                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.