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