source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_polynomialspline.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_polynomialspline.py@8091
Revision 8091, 3.3 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_splinecurve import  GM_SplineCurve
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:11
26
27@author: mnagni
28'''
29
30class GM_PolynomialSpline(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.numDerivativesAtEnd = None
45        self.curve = None
46        self.knot = []
47        self.interpolation = None
48        self.numDerivativesAtStart = None
49        self.degree = None
50        self.vectorAtEnd = []
51        self.vectorAtStart = []
52        self.numDerivativeInterior = None
53        self.controlPoints = None
54        super(GM_PolynomialSpline, self).__init__()
55
56    @property
57    def numDerivativesAtEnd(self):     
58        return self._gm_splinecurve.numDerivativesAtEnd
59
60    @numDerivativesAtEnd.setter
61    def numDerivativesAtEnd(self, value):       
62            self._gm_splinecurve.numDerivativesAtEnd = value
63
64    @property
65    def curve(self):   
66        return self._gm_splinecurve.curve
67
68    @curve.setter
69    def curve(self, value):     
70            self._gm_splinecurve.curve = value
71
72    @property
73    def knot(self):     
74        return self._gm_splinecurve.knot
75
76    @knot.setter
77    def knot(self, value):     
78            self._gm_splinecurve.knot = value
79
80    @property
81    def interpolation(self):   
82        return self._gm_splinecurve.interpolation
83
84    @interpolation.setter
85    def interpolation(self, value):     
86            self._gm_splinecurve.interpolation = value
87
88    @property
89    def numDerivativesAtStart(self):   
90        return self._gm_splinecurve.numDerivativesAtStart
91
92    @numDerivativesAtStart.setter
93    def numDerivativesAtStart(self, value):     
94            self._gm_splinecurve.numDerivativesAtStart = value
95
96    @property
97    def degree(self):   
98        return self._gm_splinecurve.degree
99
100    @degree.setter
101    def degree(self, value):   
102            self._gm_splinecurve.degree = value
103
104    @property
105    def numDerivativeInterior(self):   
106        return self._gm_splinecurve.numDerivativeInterior
107
108    @numDerivativeInterior.setter
109    def numDerivativeInterior(self, value):     
110            self._gm_splinecurve.numDerivativeInterior = value
111
112    @property
113    def controlPoints(self):   
114        return self._gm_splinecurve.controlPoints
115
116    @controlPoints.setter
117    def controlPoints(self, value):     
118            self._gm_splinecurve.controlPoints = value
119
120    def __key(self):
121        return (self.numDerivativesAtEnd, self.curve, self.knot, self.interpolation, self.numDerivativesAtStart, self.degree, self.vectorAtEnd, self.vectorAtStart, self.numDerivativeInterior, self.controlPoints)
122
123    def __eq__(self, y):
124        '''
125        Cannot compare classes which do not define a "__key" attribute
126        '''
127        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
128            return self.__key() == y.__key()
129        return id(self) == id(y)
130
131    def __hash__(self):
132        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.