source: mauRepo/MolesManager/trunk/src/ea_model/iso_19111_referencing_by_coordinates/coordinate_reference_systems/sc_singlecrs.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19111_referencing_by_coordinates/coordinate_reference_systems/sc_singlecrs.py@8091
Revision 8091, 13.2 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_19111_referencing_by_coordinates.coordinate_reference_systems.sc_crs import  SC_CRS
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:07
26
27@author: mnagni
28'''
29
30class SC_SingleCRS(SC_CRS):
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._sc_crs = SC_CRS()         
43
44        self.domainOfValidity = None
45        self.remarks = None
46        self.alias = []
47        self.scope = []
48        self._object_gm_complex = []
49        self._object_gm_primitive = []
50        self._object_gm_aggregate = []
51        self.identifier = []
52        self.name = None
53        self._coordOperationTo_cc_passthroughoperation = []
54        self._coordOperationTo_cc_concatenatedoperation = []
55        self._coordOperationTo_cc_singleoperation = []
56        self.derivedCRS = []
57        self.directPosition = []
58        self._coordinateSystem_cs_verticalcs = None
59        self._coordinateSystem_cs_userdefinedcs = None
60        self._coordinateSystem_cs_cylindricalcs = None
61        self._coordinateSystem_cs_ellipsoidalcs = None
62        self._coordinateSystem_cs_sphericalcs = None
63        self._coordinateSystem_cs_affinecs = None
64        self._coordinateSystem_cs_linearcs = None
65        self._coordinateSystem_cs_polarcs = None
66        self._coordinateSystem_cs_cartesiancs = None
67        self._datum_cd_engineeringdatum = None
68        self._datum_cd_verticaldatum = None
69        self._datum_cd_geodeticdatum = None
70        self._datum_cd_imagedatum = None
71        self.grid = []
72        self.compoundCRS = []
73        self._coordOperationFrom_cc_passthroughoperation = []
74        self._coordOperationFrom_cc_concatenatedoperation = []
75        self._coordOperationFrom_cc_singleoperation = []
76        super(SC_SingleCRS, self).__init__()
77
78    @property
79    def domainOfValidity(self): 
80        return self._sc_crs.domainOfValidity
81
82    @domainOfValidity.setter
83    def domainOfValidity(self, value): 
84            self._sc_crs.domainOfValidity = value
85
86    @property
87    def remarks(self): 
88        return self._sc_crs.remarks
89
90    @remarks.setter
91    def remarks(self, value):   
92            self._sc_crs.remarks = value
93
94    @property
95    def alias(self):   
96        return self._sc_crs.alias
97
98    @alias.setter
99    def alias(self, value):     
100            self._sc_crs.alias = value
101
102    @property
103    def scope(self):   
104        return self._sc_crs.scope
105
106    @scope.setter
107    def scope(self, value):     
108            self._sc_crs.scope = value
109
110    @property
111    def object(self):   
112        return self._sc_crs.object
113
114    @object.setter
115    def object(self, value):   
116            self._sc_crs.object = value
117
118    @property
119    def identifier(self):       
120        return self._sc_crs.identifier
121
122    @identifier.setter
123    def identifier(self, value):       
124            self._sc_crs.identifier = value
125
126    @property
127    def name(self):     
128        return self._sc_crs.name
129
130    @name.setter
131    def name(self, value):     
132            self._sc_crs.name = value
133
134    @property
135    def coordOperationTo(self): 
136        return self._sc_crs.coordOperationTo
137
138    @coordOperationTo.setter
139    def coordOperationTo(self, value): 
140            self._sc_crs.coordOperationTo = value
141
142    @property
143    def directPosition(self):   
144        return self._sc_crs.directPosition
145
146    @directPosition.setter
147    def directPosition(self, value):   
148            self._sc_crs.directPosition = value
149
150    @property
151    def coordinateSystem(self): 
152        if(has_value(self._coordinateSystem_cs_verticalcs)):
153            return self._coordinateSystem_cs_verticalcs
154        if(has_value(self._coordinateSystem_cs_userdefinedcs)):
155            return self._coordinateSystem_cs_userdefinedcs
156        if(has_value(self._coordinateSystem_cs_cylindricalcs)):
157            return self._coordinateSystem_cs_cylindricalcs
158        if(has_value(self._coordinateSystem_cs_ellipsoidalcs)):
159            return self._coordinateSystem_cs_ellipsoidalcs
160        if(has_value(self._coordinateSystem_cs_sphericalcs)):
161            return self._coordinateSystem_cs_sphericalcs
162        if(has_value(self._coordinateSystem_cs_affinecs)):
163            return self._coordinateSystem_cs_affinecs
164        if(has_value(self._coordinateSystem_cs_linearcs)):
165            return self._coordinateSystem_cs_linearcs
166        if(has_value(self._coordinateSystem_cs_polarcs)):
167            return self._coordinateSystem_cs_polarcs
168        if(has_value(self._coordinateSystem_cs_cartesiancs)):
169            return self._coordinateSystem_cs_cartesiancs
170        return  None
171
172    @coordinateSystem.setter
173    def coordinateSystem(self, value): 
174        valueClass = "%s.%s" % (type(value).__module__,type(value).__name__)
175        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_verticalcs.CS_VerticalCS":
176            self._coordinateSystem_cs_verticalcs = value
177            self._coordinateSystem_cs_userdefinedcs = None
178            self._coordinateSystem_cs_cylindricalcs = None
179            self._coordinateSystem_cs_ellipsoidalcs = None
180            self._coordinateSystem_cs_sphericalcs = None
181            self._coordinateSystem_cs_affinecs = None
182            self._coordinateSystem_cs_linearcs = None
183            self._coordinateSystem_cs_polarcs = None
184            self._coordinateSystem_cs_cartesiancs = None
185        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_userdefinedcs.CS_UserDefinedCS":
186            self._coordinateSystem_cs_userdefinedcs = value
187            self._coordinateSystem_cs_verticalcs = None
188            self._coordinateSystem_cs_cylindricalcs = None
189            self._coordinateSystem_cs_ellipsoidalcs = None
190            self._coordinateSystem_cs_sphericalcs = None
191            self._coordinateSystem_cs_affinecs = None
192            self._coordinateSystem_cs_linearcs = None
193            self._coordinateSystem_cs_polarcs = None
194            self._coordinateSystem_cs_cartesiancs = None
195        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_cylindricalcs.CS_CylindricalCS":
196            self._coordinateSystem_cs_cylindricalcs = value
197            self._coordinateSystem_cs_verticalcs = None
198            self._coordinateSystem_cs_userdefinedcs = None
199            self._coordinateSystem_cs_ellipsoidalcs = None
200            self._coordinateSystem_cs_sphericalcs = None
201            self._coordinateSystem_cs_affinecs = None
202            self._coordinateSystem_cs_linearcs = None
203            self._coordinateSystem_cs_polarcs = None
204            self._coordinateSystem_cs_cartesiancs = None
205        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_ellipsoidalcs.CS_EllipsoidalCS":
206            self._coordinateSystem_cs_ellipsoidalcs = value
207            self._coordinateSystem_cs_verticalcs = None
208            self._coordinateSystem_cs_userdefinedcs = None
209            self._coordinateSystem_cs_cylindricalcs = None
210            self._coordinateSystem_cs_sphericalcs = None
211            self._coordinateSystem_cs_affinecs = None
212            self._coordinateSystem_cs_linearcs = None
213            self._coordinateSystem_cs_polarcs = None
214            self._coordinateSystem_cs_cartesiancs = None
215        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_sphericalcs.CS_SphericalCS":
216            self._coordinateSystem_cs_sphericalcs = value
217            self._coordinateSystem_cs_verticalcs = None
218            self._coordinateSystem_cs_userdefinedcs = None
219            self._coordinateSystem_cs_cylindricalcs = None
220            self._coordinateSystem_cs_ellipsoidalcs = None
221            self._coordinateSystem_cs_affinecs = None
222            self._coordinateSystem_cs_linearcs = None
223            self._coordinateSystem_cs_polarcs = None
224            self._coordinateSystem_cs_cartesiancs = None
225        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_affinecs.CS_AffineCS":
226            self._coordinateSystem_cs_affinecs = value
227            self._coordinateSystem_cs_verticalcs = None
228            self._coordinateSystem_cs_userdefinedcs = None
229            self._coordinateSystem_cs_cylindricalcs = None
230            self._coordinateSystem_cs_ellipsoidalcs = None
231            self._coordinateSystem_cs_sphericalcs = None
232            self._coordinateSystem_cs_linearcs = None
233            self._coordinateSystem_cs_polarcs = None
234            self._coordinateSystem_cs_cartesiancs = None
235        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_linearcs.CS_LinearCS":
236            self._coordinateSystem_cs_linearcs = value
237            self._coordinateSystem_cs_verticalcs = None
238            self._coordinateSystem_cs_userdefinedcs = None
239            self._coordinateSystem_cs_cylindricalcs = None
240            self._coordinateSystem_cs_ellipsoidalcs = None
241            self._coordinateSystem_cs_sphericalcs = None
242            self._coordinateSystem_cs_affinecs = None
243            self._coordinateSystem_cs_polarcs = None
244            self._coordinateSystem_cs_cartesiancs = None
245        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_polarcs.CS_PolarCS":
246            self._coordinateSystem_cs_polarcs = value
247            self._coordinateSystem_cs_verticalcs = None
248            self._coordinateSystem_cs_userdefinedcs = None
249            self._coordinateSystem_cs_cylindricalcs = None
250            self._coordinateSystem_cs_ellipsoidalcs = None
251            self._coordinateSystem_cs_sphericalcs = None
252            self._coordinateSystem_cs_affinecs = None
253            self._coordinateSystem_cs_linearcs = None
254            self._coordinateSystem_cs_cartesiancs = None
255        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_systems.cs_cartesiancs.CS_CartesianCS":
256            self._coordinateSystem_cs_cartesiancs = value
257            self._coordinateSystem_cs_verticalcs = None
258            self._coordinateSystem_cs_userdefinedcs = None
259            self._coordinateSystem_cs_cylindricalcs = None
260            self._coordinateSystem_cs_ellipsoidalcs = None
261            self._coordinateSystem_cs_sphericalcs = None
262            self._coordinateSystem_cs_affinecs = None
263            self._coordinateSystem_cs_linearcs = None
264            self._coordinateSystem_cs_polarcs = None
265
266    @property
267    def datum(self):   
268        if(has_value(self._datum_cd_engineeringdatum)):
269            return self._datum_cd_engineeringdatum
270        if(has_value(self._datum_cd_verticaldatum)):
271            return self._datum_cd_verticaldatum
272        if(has_value(self._datum_cd_geodeticdatum)):
273            return self._datum_cd_geodeticdatum
274        if(has_value(self._datum_cd_imagedatum)):
275            return self._datum_cd_imagedatum
276        return  None
277
278    @datum.setter
279    def datum(self, value):     
280        valueClass = "%s.%s" % (type(value).__module__,type(value).__name__)
281        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.datums.cd_engineeringdatum.CD_EngineeringDatum":
282            self._datum_cd_engineeringdatum = value
283            self._datum_cd_verticaldatum = None
284            self._datum_cd_geodeticdatum = None
285            self._datum_cd_imagedatum = None
286        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.datums.cd_verticaldatum.CD_VerticalDatum":
287            self._datum_cd_verticaldatum = value
288            self._datum_cd_engineeringdatum = None
289            self._datum_cd_geodeticdatum = None
290            self._datum_cd_imagedatum = None
291        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.datums.cd_geodeticdatum.CD_GeodeticDatum":
292            self._datum_cd_geodeticdatum = value
293            self._datum_cd_engineeringdatum = None
294            self._datum_cd_verticaldatum = None
295            self._datum_cd_imagedatum = None
296        if valueClass == "ea_model.iso_19111_referencing_by_coordinates.datums.cd_imagedatum.CD_ImageDatum":
297            self._datum_cd_imagedatum = value
298            self._datum_cd_engineeringdatum = None
299            self._datum_cd_verticaldatum = None
300            self._datum_cd_geodeticdatum = None
301
302    @property
303    def grid(self):     
304        return self._sc_crs.grid
305
306    @grid.setter
307    def grid(self, value):     
308            self._sc_crs.grid = value
309
310    @property
311    def coordOperationFrom(self):       
312        return self._sc_crs.coordOperationFrom
313
314    @coordOperationFrom.setter
315    def coordOperationFrom(self, value):       
316            self._sc_crs.coordOperationFrom = value
317
318    def __key(self):
319        return (self.domainOfValidity, self.remarks, self.alias, self.scope, self.object, self.identifier, self.name, self.coordOperationTo, self.derivedCRS, self.directPosition, self.coordinateSystem, self.datum, self.grid, self.compoundCRS, self.coordOperationFrom)
320
321    def __eq__(self, y):
322        '''
323        Cannot compare classes which do not define a "__key" attribute
324        '''
325        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
326            return self.__key() == y.__key()
327        return id(self) == id(y)
328
329    def __hash__(self):
330        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.