source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/geometric_primitive/gm_surface.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/geometric_primitive/gm_surface.py@8091
Revision 8091, 5.5 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.geometric_primitive.gm_orientablesurface import  GM_OrientableSurface
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:05
26
27@author: mnagni
28'''
29
30class GM_Surface(GM_OrientableSurface):
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_orientablesurface = GM_OrientableSurface()     
43
44        self._topology_tp_directedtopo = []
45        self._topology_tp_edge = []
46        self._topology_tp_node = []
47        self._topology_tp_solid = []
48        self._topology_tp_face = []
49        self._containedPrimitive_gm_orientableprimitive = []
50        self._containedPrimitive_gm_point = []
51        self._containedPrimitive_gm_solid = []
52        self._composite_gm_compositecurve = []
53        self._composite_gm_compositesolid = []
54        self._composite_gm_compositesurface = []
55        self._composite_gm_compositepoint = []
56        self.composite = []
57        self._CRS_sc_singlecrs = None
58        self._CRS_sc_compoundcrs = None
59        self.orientation = None
60        self._patch_gm_polygon = []
61        self._patch_gm_parametriccurvesurface = []
62        self._proxy_gm_orientablesurface = None
63        self._proxy_gm_orientablecurve = None
64        self._containingPrimitive_gm_orientableprimitive = []
65        self._containingPrimitive_gm_point = []
66        self._containingPrimitive_gm_solid = []
67        self.complex = []
68        self._primitive_gm_orientableprimitive = None
69        self._primitive_gm_point = None
70        self._primitive_gm_solid = None
71        super(GM_Surface, self).__init__()
72
73    @property
74    def topology(self): 
75        return self._gm_orientablesurface.topology
76
77    @topology.setter
78    def topology(self, value): 
79            self._gm_orientablesurface.topology = value
80
81    @property
82    def containedPrimitive(self):       
83        return self._gm_orientablesurface.containedPrimitive
84
85    @containedPrimitive.setter
86    def containedPrimitive(self, value):       
87            self._gm_orientablesurface.containedPrimitive = value
88
89    @property
90    def composite(self):       
91        return self._gm_orientablesurface.composite
92
93    @composite.setter
94    def composite(self, value): 
95            self._gm_orientablesurface.composite = value
96
97    @property
98    def composite(self):       
99        return self._gm_orientablesurface.composite
100
101    @composite.setter
102    def composite(self, value): 
103            self._gm_orientablesurface.composite = value
104
105    @property
106    def CRS(self):     
107        return self._gm_orientablesurface.CRS
108
109    @CRS.setter
110    def CRS(self, value):       
111            self._gm_orientablesurface.CRS = value
112
113    @property
114    def orientation(self):     
115        return self._gm_orientablesurface.orientation
116
117    @orientation.setter
118    def orientation(self, value):       
119            self._gm_orientablesurface.orientation = value
120
121    @property
122    def patch(self):   
123        ret = []
124        for item in self._patch_gm_polygon:
125            ret.append(item)
126        for item in self._patch_gm_parametriccurvesurface:
127            ret.append(item)
128        return ret
129
130    @patch.setter
131    def patch(self, value):     
132        if isinstance(value, list):
133            self._patch_gm_polygon[:]
134            self._patch_gm_parametriccurvesurface[:]
135            for item in value:
136                valueClass = "%s.%s" % (type(item).__module__,type(item).__name__)
137                if valueClass == "ea_model.iso_19107_2003_spatial_schema.geometry.coordinate_geometry.gm_polygon.GM_Polygon":
138                    self._patch_gm_polygon.append(item)
139                    continue
140                if valueClass == "ea_model.iso_19107_2003_spatial_schema.geometry.coordinate_geometry.gm_parametriccurvesurface.GM_ParametricCurveSurface":
141                    self._patch_gm_parametriccurvesurface.append(item)
142                    continue
143
144    @property
145    def proxy(self):   
146        return self._gm_orientablesurface.proxy
147
148    @proxy.setter
149    def proxy(self, value):     
150            self._gm_orientablesurface.proxy = value
151
152    @property
153    def containingPrimitive(self):     
154        return self._gm_orientablesurface.containingPrimitive
155
156    @containingPrimitive.setter
157    def containingPrimitive(self, value):       
158            self._gm_orientablesurface.containingPrimitive = value
159
160    @property
161    def complex(self): 
162        return self._gm_orientablesurface.complex
163
164    @complex.setter
165    def complex(self, value):   
166            self._gm_orientablesurface.complex = value
167
168    @property
169    def primitive(self):       
170        return self._gm_orientablesurface.primitive
171
172    @primitive.setter
173    def primitive(self, value): 
174            self._gm_orientablesurface.primitive = value
175
176    def __key(self):
177        return (self.topology, self.containedPrimitive, self.composite, self.composite, self.CRS, self.orientation, self.patch, self.proxy, self.containingPrimitive, self.complex, self.primitive)
178
179    def __eq__(self, y):
180        '''
181        Cannot compare classes which do not define a "__key" attribute
182        '''
183        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
184            return self.__key() == y.__key()
185        return id(self) == id(y)
186
187    def __hash__(self):
188        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.