source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/geometric_complex/gm_compositesurface.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_complex/gm_compositesurface.py@8091
Revision 8091, 6.7 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 ea_model.iso_19107_2003_spatial_schema.geometry.geometric_complex.gm_composite import  GM_Composite
23from ascore.utils import has_value
24
25'''
26Created on 16-Feb-2012 16:18:05
27
28@author: mnagni
29'''
30
31class GM_CompositeSurface(GM_OrientableSurface,GM_Composite):
32    '''
33        Represents a data entity defined in a UML diagram and supposed to
34        be persisted in a relational database.
35 
36        This class has been genererated automatically using the Apache Velocity project.
37    '''
38    '''
39        Please note that any access to the inner attributes should be done using
40        the given get/set methods and NOT accessing them directly.
41    '''
42    def __init__(self):
43        self._gm_composite = GM_Composite()     
44        self._gm_orientablesurface = GM_OrientableSurface()     
45
46        self._containedPrimitive_gm_orientableprimitive = []
47        self._containedPrimitive_gm_point = []
48        self._containedPrimitive_gm_solid = []
49        self._composite_gm_compositecurve = []
50        self._composite_gm_compositesolid = []
51        self._composite_gm_compositesurface = []
52        self._composite_gm_compositepoint = []
53        self.composite = []
54        self.orientation = None
55        self._containingPrimitive_gm_orientableprimitive = []
56        self._containingPrimitive_gm_point = []
57        self._containingPrimitive_gm_solid = []
58        self._element_gm_orientableprimitive = []
59        self._element_gm_point = []
60        self._element_gm_solid = []
61        self._generator_gm_compositesurface = []
62        self._generator_gm_surface = []
63        self.topology = None
64        self._topology_tp_directedtopo = []
65        self._topology_tp_edge = []
66        self._topology_tp_node = []
67        self._topology_tp_solid = []
68        self._topology_tp_face = []
69        self._CRS_sc_singlecrs = None
70        self._CRS_sc_compoundcrs = None
71        self.subComplex = []
72        self.superComplex = []
73        self._proxy_gm_orientablesurface = None
74        self._proxy_gm_orientablecurve = None
75        self._primitive_gm_orientableprimitive = None
76        self._primitive_gm_point = None
77        self._primitive_gm_solid = None
78        self.complex = []
79        super(GM_CompositeSurface, self).__init__()
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 orientation(self):     
107        return self._gm_orientablesurface.orientation
108
109    @orientation.setter
110    def orientation(self, value):       
111            self._gm_orientablesurface.orientation = value
112
113    @property
114    def containingPrimitive(self):     
115        return self._gm_orientablesurface.containingPrimitive
116
117    @containingPrimitive.setter
118    def containingPrimitive(self, value):       
119            self._gm_orientablesurface.containingPrimitive = value
120
121    @property
122    def element(self): 
123        return self._gm_composite.element
124
125    @element.setter
126    def element(self, value):   
127            self._gm_composite.element = value
128
129    @property
130    def generator(self):       
131        ret = []
132        for item in self._generator_gm_compositesurface:
133            ret.append(item)
134        for item in self._generator_gm_surface:
135            ret.append(item)
136        return ret
137
138    @generator.setter
139    def generator(self, value): 
140        if isinstance(value, list):
141            self._generator_gm_compositesurface[:]
142            self._generator_gm_surface[:]
143            for item in value:
144                valueClass = "%s.%s" % (type(item).__module__,type(item).__name__)
145                if valueClass == "ea_model.iso_19107_2003_spatial_schema.geometry.geometric_complex.gm_compositesurface.GM_CompositeSurface":
146                    self._generator_gm_compositesurface.append(item)
147                    continue
148                if valueClass == "ea_model.iso_19107_2003_spatial_schema.geometry.geometric_primitive.gm_surface.GM_Surface":
149                    self._generator_gm_surface.append(item)
150                    continue
151
152    @property
153    def topology(self): 
154        return self._gm_composite.topology
155
156    @topology.setter
157    def topology(self, value): 
158            self._gm_composite.topology = value
159
160    @property
161    def topology(self): 
162        return self._gm_orientablesurface.topology
163
164    @topology.setter
165    def topology(self, value): 
166            self._gm_orientablesurface.topology = value
167
168    @property
169    def CRS(self):     
170        return self._gm_composite.CRS
171
172    @CRS.setter
173    def CRS(self, value):       
174            self._gm_composite.CRS = value
175
176    @property
177    def subComplex(self):       
178        return self._gm_composite.subComplex
179
180    @subComplex.setter
181    def subComplex(self, value):       
182            self._gm_composite.subComplex = value
183
184    @property
185    def superComplex(self):     
186        return self._gm_composite.superComplex
187
188    @superComplex.setter
189    def superComplex(self, value):     
190            self._gm_composite.superComplex = value
191
192    @property
193    def proxy(self):   
194        return self._gm_orientablesurface.proxy
195
196    @proxy.setter
197    def proxy(self, value):     
198            self._gm_orientablesurface.proxy = value
199
200    @property
201    def primitive(self):       
202        return self._gm_orientablesurface.primitive
203
204    @primitive.setter
205    def primitive(self, value): 
206            self._gm_orientablesurface.primitive = value
207
208    @property
209    def complex(self): 
210        return self._gm_orientablesurface.complex
211
212    @complex.setter
213    def complex(self, value):   
214            self._gm_orientablesurface.complex = value
215
216    def __key(self):
217        return (self.containedPrimitive, self.composite, self.composite, self.orientation, self.containingPrimitive, self.element, self.generator, self.topology, self.topology, self.CRS, self.subComplex, self.superComplex, self.proxy, self.primitive, self.complex)
218
219    def __eq__(self, y):
220        '''
221        Cannot compare classes which do not define a "__key" attribute
222        '''
223        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
224            return self.__key() == y.__key()
225        return id(self) == id(y)
226
227    def __hash__(self):
228        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.