source: mauRepo/MolesManager/trunk/src/ea_model/iso_19111_referencing_by_coordinates/coordinate_operations/cc_conversion.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19111_referencing_by_coordinates/coordinate_operations/cc_conversion.py@8091
Revision 8091, 6.1 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_operations.cc_singleoperation import  CC_SingleOperation
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:05
26
27@author: mnagni
28'''
29
30class CC_Conversion(CC_SingleOperation):
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._cc_singleoperation = CC_SingleOperation()         
43
44        self.domainOfValidity = None
45        self.remarks = None
46        self.method = None
47        self.alias = []
48        self.scope = []
49        self.passThruOperation = []
50        self._targetCRS_sc_singlecrs = None
51        self._targetCRS_sc_compoundcrs = None
52        self.identifier = []
53        self.name = None
54        self.concatOperation = []
55        self._coordinateOperationAccuracy_dq_griddeddatapositionalaccuracy = []
56        self._coordinateOperationAccuracy_dq_relativeinternalpositionalaccuracy = []
57        self._coordinateOperationAccuracy_dq_absoluteexternalpositionalaccuracy = []
58        self._referenceSystem_sc_projectedcrs = []
59        self._referenceSystem_sc_derivedcrs = []
60        self._parameterValue_cc_operationparametervalue = []
61        self._parameterValue_cc_parametervaluegroup = []
62        self.operationVersion = None
63        self._sourceCRS_sc_singlecrs = None
64        self._sourceCRS_sc_compoundcrs = None
65        super(CC_Conversion, self).__init__()
66
67    @property
68    def domainOfValidity(self): 
69        return self._cc_singleoperation.domainOfValidity
70
71    @domainOfValidity.setter
72    def domainOfValidity(self, value): 
73            self._cc_singleoperation.domainOfValidity = value
74
75    @property
76    def remarks(self): 
77        return self._cc_singleoperation.remarks
78
79    @remarks.setter
80    def remarks(self, value):   
81            self._cc_singleoperation.remarks = value
82
83    @property
84    def method(self):   
85        return self._cc_singleoperation.method
86
87    @method.setter
88    def method(self, value):   
89            self._cc_singleoperation.method = value
90
91    @property
92    def alias(self):   
93        return self._cc_singleoperation.alias
94
95    @alias.setter
96    def alias(self, value):     
97            self._cc_singleoperation.alias = value
98
99    @property
100    def scope(self):   
101        return self._cc_singleoperation.scope
102
103    @scope.setter
104    def scope(self, value):     
105            self._cc_singleoperation.scope = value
106
107    @property
108    def passThruOperation(self):       
109        return self._cc_singleoperation.passThruOperation
110
111    @passThruOperation.setter
112    def passThruOperation(self, value): 
113            self._cc_singleoperation.passThruOperation = value
114
115    @property
116    def targetCRS(self):       
117        return self._cc_singleoperation.targetCRS
118
119    @targetCRS.setter
120    def targetCRS(self, value): 
121            self._cc_singleoperation.targetCRS = value
122
123    @property
124    def identifier(self):       
125        return self._cc_singleoperation.identifier
126
127    @identifier.setter
128    def identifier(self, value):       
129            self._cc_singleoperation.identifier = value
130
131    @property
132    def name(self):     
133        return self._cc_singleoperation.name
134
135    @name.setter
136    def name(self, value):     
137            self._cc_singleoperation.name = value
138
139    @property
140    def concatOperation(self): 
141        return self._cc_singleoperation.concatOperation
142
143    @concatOperation.setter
144    def concatOperation(self, value):   
145            self._cc_singleoperation.concatOperation = value
146
147    @property
148    def coordinateOperationAccuracy(self):     
149        return self._cc_singleoperation.coordinateOperationAccuracy
150
151    @coordinateOperationAccuracy.setter
152    def coordinateOperationAccuracy(self, value):       
153            self._cc_singleoperation.coordinateOperationAccuracy = value
154
155    @property
156    def referenceSystem(self): 
157        ret = []
158        for item in self._referenceSystem_sc_projectedcrs:
159            ret.append(item)
160        for item in self._referenceSystem_sc_derivedcrs:
161            ret.append(item)
162        return ret
163
164    @referenceSystem.setter
165    def referenceSystem(self, value):   
166        if isinstance(value, list):
167            self._referenceSystem_sc_projectedcrs[:]
168            self._referenceSystem_sc_derivedcrs[:]
169            for item in value:
170                valueClass = "%s.%s" % (type(item).__module__,type(item).__name__)
171                if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_reference_systems.sc_projectedcrs.SC_ProjectedCRS":
172                    self._referenceSystem_sc_projectedcrs.append(item)
173                    continue
174                if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_reference_systems.sc_derivedcrs.SC_DerivedCRS":
175                    self._referenceSystem_sc_derivedcrs.append(item)
176                    continue
177
178    @property
179    def parameterValue(self):   
180        return self._cc_singleoperation.parameterValue
181
182    @parameterValue.setter
183    def parameterValue(self, value):   
184            self._cc_singleoperation.parameterValue = value
185
186    @property
187    def sourceCRS(self):       
188        return self._cc_singleoperation.sourceCRS
189
190    @sourceCRS.setter
191    def sourceCRS(self, value): 
192            self._cc_singleoperation.sourceCRS = value
193
194    def __key(self):
195        return (self.domainOfValidity, self.remarks, self.method, self.alias, self.scope, self.passThruOperation, self.targetCRS, self.identifier, self.name, self.concatOperation, self.coordinateOperationAccuracy, self.referenceSystem, self.parameterValue, self.operationVersion, self.sourceCRS)
196
197    def __eq__(self, y):
198        '''
199        Cannot compare classes which do not define a "__key" attribute
200        '''
201        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
202            return self.__key() == y.__key()
203        return id(self) == id(y)
204
205    def __hash__(self):
206        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.