1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | from ea_model.iso_19107_2003_spatial_schema.geometry.coordinate_geometry.gm_splinecurve import GM_SplineCurve |
---|
22 | from ascore.utils import has_value, collectionProofHash |
---|
23 | |
---|
24 | ''' |
---|
25 | Created on 10-Jul-2012 14:15:03 |
---|
26 | |
---|
27 | @author: mnagni |
---|
28 | ''' |
---|
29 | |
---|
30 | class GM_BSplineCurve(GM_SplineCurve): |
---|
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_splinecurve = GM_SplineCurve() |
---|
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_BSplineCurve, self).__init__() |
---|
55 | @property |
---|
56 | def curve(self): |
---|
57 | return self._gm_splinecurve.curve |
---|
58 | |
---|
59 | @curve.setter |
---|
60 | def curve(self, value): |
---|
61 | self._gm_splinecurve.curve = value |
---|
62 | @property |
---|
63 | def numDerivativesAtEnd(self): |
---|
64 | return self._gm_splinecurve.numDerivativesAtEnd |
---|
65 | |
---|
66 | @numDerivativesAtEnd.setter |
---|
67 | def numDerivativesAtEnd(self, value): |
---|
68 | self._gm_splinecurve.numDerivativesAtEnd = value |
---|
69 | @property |
---|
70 | def knot(self): |
---|
71 | return self._gm_splinecurve.knot |
---|
72 | |
---|
73 | @knot.setter |
---|
74 | def knot(self, value): |
---|
75 | self._gm_splinecurve.knot = value |
---|
76 | @property |
---|
77 | def interpolation(self): |
---|
78 | return self._gm_splinecurve.interpolation |
---|
79 | |
---|
80 | @interpolation.setter |
---|
81 | def interpolation(self, value): |
---|
82 | self._gm_splinecurve.interpolation = value |
---|
83 | @property |
---|
84 | def numDerivativesAtStart(self): |
---|
85 | return self._gm_splinecurve.numDerivativesAtStart |
---|
86 | |
---|
87 | @numDerivativesAtStart.setter |
---|
88 | def numDerivativesAtStart(self, value): |
---|
89 | self._gm_splinecurve.numDerivativesAtStart = value |
---|
90 | @property |
---|
91 | def degree(self): |
---|
92 | return self._gm_splinecurve.degree |
---|
93 | |
---|
94 | @degree.setter |
---|
95 | def degree(self, value): |
---|
96 | self._gm_splinecurve.degree = value |
---|
97 | @property |
---|
98 | def numDerivativeInterior(self): |
---|
99 | return self._gm_splinecurve.numDerivativeInterior |
---|
100 | |
---|
101 | @numDerivativeInterior.setter |
---|
102 | def numDerivativeInterior(self, value): |
---|
103 | self._gm_splinecurve.numDerivativeInterior = value |
---|
104 | @property |
---|
105 | def controlPoints(self): |
---|
106 | return self._gm_splinecurve.controlPoints |
---|
107 | |
---|
108 | @controlPoints.setter |
---|
109 | def controlPoints(self, value): |
---|
110 | self._gm_splinecurve.controlPoints = value |
---|
111 | |
---|
112 | def synchronize(self): |
---|
113 | pass |
---|
114 | |
---|
115 | def __key(self): |
---|
116 | return (self.curveForm, self.curve, self.numDerivativesAtEnd, self.knot, self.interpolation, self.numDerivativesAtStart, self.degree, self.numDerivativeInterior, self.isPolynomial, self.controlPoints, self.knotSpec) |
---|
117 | |
---|
118 | def __eq__(self, y): |
---|
119 | if type(self) != type(y): |
---|
120 | return False |
---|
121 | ''' |
---|
122 | Cannot compare classes which do not define a "__key" attribute |
---|
123 | ''' |
---|
124 | if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |
---|
125 | return self.__key() == y.__key() |
---|
126 | return id(self) == id(y) |
---|
127 | |
---|
128 | def __hash__(self): |
---|
129 | return collectionProofHash(self.__key()) |
---|