source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_bsplinesurface.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_bsplinesurface.py@8457
Revision 8457, 3.2 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_griddedsurface import  GM_GriddedSurface
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:06
26
27@author: mnagni
28'''
29
30class GM_BSplineSurface(GM_GriddedSurface):
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_griddedsurface = GM_GriddedSurface()   
43
44                self.interpolation = None
45                self.degree = []
46                self.surface = None
47                self.knotSpec = None
48                self.surfaceForm = None
49                self.columns = None
50                self.verticalCurveType = None
51                self.knot = []
52                self.numDerivativesOnBoundary = None
53                self.isPolynomial = None
54                self.horizontalCurveType = None
55                self.controlPoint = None
56                self.rows = None
57                super(GM_BSplineSurface, self).__init__()
58        @property
59        def interpolation(self):       
60                return self._gm_griddedsurface.interpolation
61
62        @interpolation.setter
63        def interpolation(self, value):
64                        self._gm_griddedsurface.interpolation = value
65        @property
66        def surface(self):     
67                return self._gm_griddedsurface.surface
68
69        @surface.setter
70        def surface(self, value):       
71                        self._gm_griddedsurface.surface = value
72        @property
73        def columns(self):     
74                return self._gm_griddedsurface.columns
75
76        @columns.setter
77        def columns(self, value):       
78                        self._gm_griddedsurface.columns = value
79        @property
80        def verticalCurveType(self):   
81                return self._gm_griddedsurface.verticalCurveType
82
83        @verticalCurveType.setter
84        def verticalCurveType(self, value):     
85                        self._gm_griddedsurface.verticalCurveType = value
86        @property
87        def numDerivativesOnBoundary(self):     
88                return self._gm_griddedsurface.numDerivativesOnBoundary
89
90        @numDerivativesOnBoundary.setter
91        def numDerivativesOnBoundary(self, value):     
92                        self._gm_griddedsurface.numDerivativesOnBoundary = value
93        @property
94        def horizontalCurveType(self): 
95                return self._gm_griddedsurface.horizontalCurveType
96
97        @horizontalCurveType.setter
98        def horizontalCurveType(self, value):   
99                        self._gm_griddedsurface.horizontalCurveType = value
100        @property
101        def controlPoint(self):
102                return self._gm_griddedsurface.controlPoint
103
104        @controlPoint.setter
105        def controlPoint(self, value): 
106                        self._gm_griddedsurface.controlPoint = value
107        @property
108        def rows(self):
109                return self._gm_griddedsurface.rows
110
111        @rows.setter
112        def rows(self, value): 
113                        self._gm_griddedsurface.rows = value
114
115        def synchronize(self):
116                pass
117
118        def __key(self):
119                return (self.interpolation, self.degree, self.surface, self.knotSpec, self.surfaceForm, self.columns, self.verticalCurveType, self.knot, self.numDerivativesOnBoundary, self.isPolynomial, self.horizontalCurveType, self.controlPoint, self.rows)
120
121        def __eq__(self, y):
122                if type(self) != type(y):
123                        return False
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 collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.