source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19156_2011_observations_and_measurements/domain_specific_sampling_features/trajectory.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/domain_specific_sampling_features/trajectory.py@8457
Revision 8457, 3.5 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.sampling_features.samplingcurve.sf_samplingcurve import  SF_SamplingCurve
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:03
26
27@author: mnagni
28'''
29
30class Trajectory(SF_SamplingCurve):
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._sf_samplingcurve = SF_SamplingCurve()     
43
44                self.lineage = None
45                self.shape = None
46                self.shape = None
47                super(Trajectory, self).__init__()
48        @property
49        def relatedObservation(self):   
50                return self._sf_samplingcurve.relatedObservation
51
52        @relatedObservation.setter
53        def relatedObservation(self, value):   
54                        self._sf_samplingcurve.relatedObservation = value
55        @property
56        def lineage(self):     
57                return self._sf_samplingcurve.lineage
58
59        @lineage.setter
60        def lineage(self, value):       
61                        self._sf_samplingcurve.lineage = value
62        @property
63        def relatedSamplingFeature(self):       
64                return self._sf_samplingcurve.relatedSamplingFeature
65
66        @relatedSamplingFeature.setter
67        def relatedSamplingFeature(self, value):       
68                        self._sf_samplingcurve.relatedSamplingFeature = value
69        @property
70        def propertyValueProvider(self):       
71                return self._sf_samplingcurve.propertyValueProvider
72
73        @propertyValueProvider.setter
74        def propertyValueProvider(self, value):
75                        self._sf_samplingcurve.propertyValueProvider = value
76        @property
77        def positionalAccuracy(self):   
78                return self._sf_samplingcurve.positionalAccuracy
79
80        @positionalAccuracy.setter
81        def positionalAccuracy(self, value):   
82                        self._sf_samplingcurve.positionalAccuracy = value
83        @property
84        def sampledFeature(self):       
85                return self._sf_samplingcurve.sampledFeature
86
87        @sampledFeature.setter
88        def sampledFeature(self, value):       
89                        self._sf_samplingcurve.sampledFeature = value
90        @property
91        def sampledFeature(self):       
92                return self._sf_samplingcurve.sampledFeature
93
94        @sampledFeature.setter
95        def sampledFeature(self, value):       
96                        self._sf_samplingcurve.sampledFeature = value
97        @property
98        def shape(self):       
99                return self._sf_samplingcurve.shape
100
101        @shape.setter
102        def shape(self, value):
103                        self._sf_samplingcurve.shape = value
104        @property
105        def shape(self):       
106                return self._sf_samplingcurve.shape
107
108        @shape.setter
109        def shape(self, value):
110                        self._sf_samplingcurve.shape = value
111        @property
112        def hostedProcedure(self):     
113                return self._sf_samplingcurve.hostedProcedure
114
115        @hostedProcedure.setter
116        def hostedProcedure(self, value):       
117                        self._sf_samplingcurve.hostedProcedure = value
118        @property
119        def parameter(self):   
120                return self._sf_samplingcurve.parameter
121
122        @parameter.setter
123        def parameter(self, value):     
124                        self._sf_samplingcurve.parameter = value
125
126        def synchronize(self):
127                pass
128
129        def __key(self):
130                return (self.relatedObservation, self.lineage, self.relatedSamplingFeature, self.propertyValueProvider, self.positionalAccuracy, self.sampledFeature, self.sampledFeature, self.shape, self.shape, self.hostedProcedure, self.parameter)
131
132        def __eq__(self, y):
133                if type(self) != type(y):
134                        return False
135                '''
136                Cannot compare classes which do not define a "__key" attribute
137                '''
138                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
139                        return self.__key() == y.__key()
140                return id(self) == id(y)
141
142        def __hash__(self):
143                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.