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