source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_circle.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_circle.py@8457
Revision 8457, 2.6 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.coordinate_geometry.gm_arc import  GM_Arc
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:10
26
27@author: mnagni
28'''
29
30class GM_Circle(GM_Arc):
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_arc = GM_Arc()         
43
44                self.curve = None
45                self.numDerivativesAtEnd = None
46                self.interpolation = None
47                self.numDerivativesAtStart = None
48                self.numDerivativeInterior = None
49                self.numArc = None
50                self.controlPoints = None
51                super(GM_Circle, self).__init__()
52        @property
53        def curve(self):       
54                return self._gm_arc.curve
55
56        @curve.setter
57        def curve(self, value):
58                        self._gm_arc.curve = value
59        @property
60        def numDerivativesAtEnd(self): 
61                return self._gm_arc.numDerivativesAtEnd
62
63        @numDerivativesAtEnd.setter
64        def numDerivativesAtEnd(self, value):   
65                        self._gm_arc.numDerivativesAtEnd = value
66        @property
67        def interpolation(self):       
68                return self._gm_arc.interpolation
69
70        @interpolation.setter
71        def interpolation(self, value):
72                        self._gm_arc.interpolation = value
73        @property
74        def numDerivativesAtStart(self):       
75                return self._gm_arc.numDerivativesAtStart
76
77        @numDerivativesAtStart.setter
78        def numDerivativesAtStart(self, value):
79                        self._gm_arc.numDerivativesAtStart = value
80        @property
81        def numDerivativeInterior(self):       
82                return self._gm_arc.numDerivativeInterior
83
84        @numDerivativeInterior.setter
85        def numDerivativeInterior(self, value):
86                        self._gm_arc.numDerivativeInterior = value
87        @property
88        def numArc(self):       
89                return self._gm_arc.numArc
90
91        @numArc.setter
92        def numArc(self, value):       
93                        self._gm_arc.numArc = value
94        @property
95        def controlPoints(self):       
96                return self._gm_arc.controlPoints
97
98        @controlPoints.setter
99        def controlPoints(self, value):
100                        self._gm_arc.controlPoints = value
101
102        def synchronize(self):
103                pass
104
105        def __key(self):
106                return (self.curve, self.numDerivativesAtEnd, self.interpolation, self.numDerivativesAtStart, self.numDerivativeInterior, self.numArc, self.controlPoints)
107
108        def __eq__(self, y):
109                if type(self) != type(y):
110                        return False
111                '''
112                Cannot compare classes which do not define a "__key" attribute
113                '''
114                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
115                        return self.__key() == y.__key()
116                return id(self) == id(y)
117
118        def __hash__(self):
119                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.