source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19133_tracking_and_navigation/tracking/point_estimates/eg_pointestimate.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19133_tracking_and_navigation/tracking/point_estimates/eg_pointestimate.py@8457
Revision 8457, 2.9 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_19107_2003_spatial_schema.geometry.geometric_primitive.gm_point import  GM_Point
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:00
26
27@author: mnagni
28'''
29
30class EG_PointEstimate(GM_Point):
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._gm_point = GM_Point()     
43
44                self.CRS = None
45                self.proxy = None
46                self.position = None
47                super(EG_PointEstimate, self).__init__()
48        @property
49        def topology(self):     
50                return self._gm_point.topology
51
52        @topology.setter
53        def topology(self, value):     
54                        self._gm_point.topology = value
55        @property
56        def containedPrimitive(self):   
57                return self._gm_point.containedPrimitive
58
59        @containedPrimitive.setter
60        def containedPrimitive(self, value):   
61                        self._gm_point.containedPrimitive = value
62        @property
63        def composite(self):   
64                return self._gm_point.composite
65
66        @composite.setter
67        def composite(self, value):     
68                        self._gm_point.composite = value
69        @property
70        def composite(self):   
71                return self._gm_point.composite
72
73        @composite.setter
74        def composite(self, value):     
75                        self._gm_point.composite = value
76        @property
77        def CRS(self): 
78                return self._gm_point.CRS
79
80        @CRS.setter
81        def CRS(self, value):   
82                        self._gm_point.CRS = value
83        @property
84        def gridPoint(self):   
85                return self._gm_point.gridPoint
86
87        @gridPoint.setter
88        def gridPoint(self, value):     
89                        self._gm_point.gridPoint = value
90        @property
91        def proxy(self):       
92                return self._gm_point.proxy
93
94        @proxy.setter
95        def proxy(self, value):
96                        self._gm_point.proxy = value
97        @property
98        def containingPrimitive(self): 
99                return self._gm_point.containingPrimitive
100
101        @containingPrimitive.setter
102        def containingPrimitive(self, value):   
103                        self._gm_point.containingPrimitive = value
104        @property
105        def complex(self):     
106                return self._gm_point.complex
107
108        @complex.setter
109        def complex(self, value):       
110                        self._gm_point.complex = value
111        @property
112        def position(self):     
113                return self._gm_point.position
114
115        @position.setter
116        def position(self, value):     
117                        self._gm_point.position = value
118
119        def synchronize(self):
120                pass
121
122        def __key(self):
123                return (self.topology, self.containedPrimitive, self.composite, self.composite, self.CRS, self.gridPoint, self.proxy, self.containingPrimitive, self.complex, self.position)
124
125        def __eq__(self, y):
126                if type(self) != type(y):
127                        return False
128                '''
129                Cannot compare classes which do not define a "__key" attribute
130                '''
131                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
132                        return self.__key() == y.__key()
133                return id(self) == id(y)
134
135        def __hash__(self):
136                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.