source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_bezier.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_bezier.py@8091
Revision 8091, 4.0 KB checked in by mnagni, 8 years ago (diff)

The migration process now includes
1) deployment_data files
2) XML document hash
3) full Dojo support


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
23
24'''
25Created on 16-Feb-2012 16:18:09
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.numDerivativesAtEnd = None
46        self.curve = None
47        self.knot = []
48        self.interpolation = None
49        self.numDerivativesAtStart = None
50        self.degree = None
51        self.numDerivativeInterior = None
52        self.isPolynomial = None
53        self.controlPoints = None
54        self.knotSpec = None
55        super(GM_Bezier, self).__init__()
56
57    @property
58    def curveForm(self):       
59        return self._gm_bsplinecurve.curveForm
60
61    @curveForm.setter
62    def curveForm(self, value): 
63            self._gm_bsplinecurve.curveForm = value
64
65    @property
66    def numDerivativesAtEnd(self):     
67        return self._gm_bsplinecurve.numDerivativesAtEnd
68
69    @numDerivativesAtEnd.setter
70    def numDerivativesAtEnd(self, value):       
71            self._gm_bsplinecurve.numDerivativesAtEnd = value
72
73    @property
74    def curve(self):   
75        return self._gm_bsplinecurve.curve
76
77    @curve.setter
78    def curve(self, value):     
79            self._gm_bsplinecurve.curve = value
80
81    @property
82    def knot(self):     
83        return self._gm_bsplinecurve.knot
84
85    @knot.setter
86    def knot(self, value):     
87            self._gm_bsplinecurve.knot = value
88
89    @property
90    def interpolation(self):   
91        return self._gm_bsplinecurve.interpolation
92
93    @interpolation.setter
94    def interpolation(self, value):     
95            self._gm_bsplinecurve.interpolation = value
96
97    @property
98    def numDerivativesAtStart(self):   
99        return self._gm_bsplinecurve.numDerivativesAtStart
100
101    @numDerivativesAtStart.setter
102    def numDerivativesAtStart(self, value):     
103            self._gm_bsplinecurve.numDerivativesAtStart = value
104
105    @property
106    def degree(self):   
107        return self._gm_bsplinecurve.degree
108
109    @degree.setter
110    def degree(self, value):   
111            self._gm_bsplinecurve.degree = value
112
113    @property
114    def numDerivativeInterior(self):   
115        return self._gm_bsplinecurve.numDerivativeInterior
116
117    @numDerivativeInterior.setter
118    def numDerivativeInterior(self, value):     
119            self._gm_bsplinecurve.numDerivativeInterior = value
120
121    @property
122    def isPolynomial(self):     
123        return self._gm_bsplinecurve.isPolynomial
124
125    @isPolynomial.setter
126    def isPolynomial(self, value):     
127            self._gm_bsplinecurve.isPolynomial = value
128
129    @property
130    def controlPoints(self):   
131        return self._gm_bsplinecurve.controlPoints
132
133    @controlPoints.setter
134    def controlPoints(self, value):     
135            self._gm_bsplinecurve.controlPoints = value
136
137    @property
138    def knotSpec(self): 
139        return self._gm_bsplinecurve.knotSpec
140
141    @knotSpec.setter
142    def knotSpec(self, value): 
143            self._gm_bsplinecurve.knotSpec = value
144
145    def __key(self):
146        return (self.curveForm, self.numDerivativesAtEnd, self.curve, self.knot, self.interpolation, self.numDerivativesAtStart, self.degree, self.numDerivativeInterior, self.isPolynomial, self.controlPoints, self.knotSpec)
147
148    def __eq__(self, y):
149        '''
150        Cannot compare classes which do not define a "__key" attribute
151        '''
152        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
153            return self.__key() == y.__key()
154        return id(self) == id(y)
155
156    def __hash__(self):
157        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.