source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19136_gml/geometryprimitives/circlebycenterpoint.py @ 8397

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19136_gml/geometryprimitives/circlebycenterpoint.py@8397
Revision 8397, 3.2 KB checked in by mnagni, 7 years ago (diff)

Incomplete - # 22504: CedaMoles? as python package
 http://team.ceda.ac.uk/trac/ceda/ticket/22504

  • 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_19136_gml.geometryprimitives.arcbycenterpoint import  ArcByCenterPoint
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 26-Jun-2012 10:16:33
26
27@author: mnagni
28'''
29
30class CircleByCenterPoint(ArcByCenterPoint):
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._arcbycenterpoint = ArcByCenterPoint()     
43
44                self.radius = None
45                self.startAngle = None
46                self.curve = None
47                self.numDerivativesAtEnd = None
48                self.interpolation = None
49                self.numDerivativesAtStart = None
50                self.numDerivativeInterior = None
51                self.endAngle = None
52                self.controlPoint = None
53                super(CircleByCenterPoint, self).__init__()
54        @property
55        def radius(self):       
56                return self._arcbycenterpoint.radius
57
58        @radius.setter
59        def radius(self, value):       
60                        self._arcbycenterpoint.radius = value
61        @property
62        def startAngle(self):   
63                return self._arcbycenterpoint.startAngle
64
65        @startAngle.setter
66        def startAngle(self, value):   
67                        self._arcbycenterpoint.startAngle = value
68        @property
69        def curve(self):       
70                return self._arcbycenterpoint.curve
71
72        @curve.setter
73        def curve(self, value):
74                        self._arcbycenterpoint.curve = value
75        @property
76        def numDerivativesAtEnd(self): 
77                return self._arcbycenterpoint.numDerivativesAtEnd
78
79        @numDerivativesAtEnd.setter
80        def numDerivativesAtEnd(self, value):   
81                        self._arcbycenterpoint.numDerivativesAtEnd = value
82        @property
83        def interpolation(self):       
84                return self._arcbycenterpoint.interpolation
85
86        @interpolation.setter
87        def interpolation(self, value):
88                        self._arcbycenterpoint.interpolation = value
89        @property
90        def numDerivativesAtStart(self):       
91                return self._arcbycenterpoint.numDerivativesAtStart
92
93        @numDerivativesAtStart.setter
94        def numDerivativesAtStart(self, value):
95                        self._arcbycenterpoint.numDerivativesAtStart = value
96        @property
97        def numDerivativeInterior(self):       
98                return self._arcbycenterpoint.numDerivativeInterior
99
100        @numDerivativeInterior.setter
101        def numDerivativeInterior(self, value):
102                        self._arcbycenterpoint.numDerivativeInterior = value
103        @property
104        def endAngle(self):     
105                return self._arcbycenterpoint.endAngle
106
107        @endAngle.setter
108        def endAngle(self, value):     
109                        self._arcbycenterpoint.endAngle = value
110        @property
111        def controlPoint(self):
112                return self._arcbycenterpoint.controlPoint
113
114        @controlPoint.setter
115        def controlPoint(self, value): 
116                        self._arcbycenterpoint.controlPoint = value
117
118        def synchronize(self):
119                pass
120
121        def __key(self):
122                return (self.radius, self.startAngle, self.curve, self.numDerivativesAtEnd, self.interpolation, self.numDerivativesAtStart, self.numDerivativeInterior, self.endAngle, self.controlPoint)
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.