source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19111_referencing_by_coordinates/coordinate_operations/cc_passthroughoperation.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19111_referencing_by_coordinates/coordinate_operations/cc_passthroughoperation.py@8457
Revision 8457, 5.5 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_19111_referencing_by_coordinates.coordinate_operations.cc_coordinateoperation import  CC_CoordinateOperation
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:03
26
27@author: mnagni
28'''
29
30class CC_PassThroughOperation(CC_CoordinateOperation):
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_coordinateoperation = CC_CoordinateOperation()         
43
44                self.domainOfValidity = None
45                self.remarks = None
46                self.modifiedCoordinate = []
47                self.targetCRS = None
48                self.name = None
49                self._coordOperation_cc_concatenatedoperation = None
50                self._coordOperation_cc_passthroughoperation = None
51                self._coordOperation_cc_singleoperation = None
52                self._coordOperation = None
53                self.operationVersion = None
54                self.sourceCRS = None
55                super(CC_PassThroughOperation, self).__init__()
56        @property
57        def domainOfValidity(self):     
58                return self._cc_coordinateoperation.domainOfValidity
59
60        @domainOfValidity.setter
61        def domainOfValidity(self, value):     
62                        self._cc_coordinateoperation.domainOfValidity = value
63        @property
64        def remarks(self):     
65                return self._cc_coordinateoperation.remarks
66
67        @remarks.setter
68        def remarks(self, value):       
69                        self._cc_coordinateoperation.remarks = value
70        @property
71        def alias(self):       
72                return self._cc_coordinateoperation.alias
73
74        @alias.setter
75        def alias(self, value):
76                        self._cc_coordinateoperation.alias = value
77        @property
78        def scope(self):       
79                return self._cc_coordinateoperation.scope
80
81        @scope.setter
82        def scope(self, value):
83                        self._cc_coordinateoperation.scope = value
84        @property
85        def targetCRS(self):   
86                return self._cc_coordinateoperation.targetCRS
87
88        @targetCRS.setter
89        def targetCRS(self, value):     
90                        self._cc_coordinateoperation.targetCRS = value
91        @property
92        def passThruOperation(self):   
93                return self._cc_coordinateoperation.passThruOperation
94
95        @passThruOperation.setter
96        def passThruOperation(self, value):     
97                        self._cc_coordinateoperation.passThruOperation = value
98        @property
99        def identifier(self):   
100                return self._cc_coordinateoperation.identifier
101
102        @identifier.setter
103        def identifier(self, value):   
104                        self._cc_coordinateoperation.identifier = value
105        @property
106        def name(self):
107                return self._cc_coordinateoperation.name
108
109        @name.setter
110        def name(self, value): 
111                        self._cc_coordinateoperation.name = value
112        @property
113        def concatOperation(self):     
114                return self._cc_coordinateoperation.concatOperation
115
116        @concatOperation.setter
117        def concatOperation(self, value):       
118                        self._cc_coordinateoperation.concatOperation = value
119        @property
120        def coordinateOperationAccuracy(self): 
121                return self._cc_coordinateoperation.coordinateOperationAccuracy
122
123        @coordinateOperationAccuracy.setter
124        def coordinateOperationAccuracy(self, value):   
125                        self._cc_coordinateoperation.coordinateOperationAccuracy = value
126        @property
127        def coordOperation(self):       
128                if(has_value(self._coordOperation_cc_concatenatedoperation)):
129                        return self._coordOperation_cc_concatenatedoperation
130                if(has_value(self._coordOperation_cc_passthroughoperation)):
131                        return self._coordOperation_cc_passthroughoperation
132                if(has_value(self._coordOperation_cc_singleoperation)):
133                        return self._coordOperation_cc_singleoperation
134                return  None
135
136        @coordOperation.setter
137        def coordOperation(self, value):       
138                valueClass = "%s.%s" % (type(value).__module__,type(value).__name__)
139                if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_operations.cc_concatenatedoperation.CC_ConcatenatedOperation":
140                        self._coordOperation_cc_concatenatedoperation = value
141                        self._coordOperation_cc_passthroughoperation = None
142                        self._coordOperation_cc_singleoperation = None
143                if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_operations.cc_passthroughoperation.CC_PassThroughOperation":
144                        self._coordOperation_cc_passthroughoperation = value
145                        self._coordOperation_cc_concatenatedoperation = None
146                        self._coordOperation_cc_singleoperation = None
147                if valueClass == "ea_model.iso_19111_referencing_by_coordinates.coordinate_operations.cc_singleoperation.CC_SingleOperation":
148                        self._coordOperation_cc_singleoperation = value
149                        self._coordOperation_cc_concatenatedoperation = None
150                        self._coordOperation_cc_passthroughoperation = None
151        @property
152        def operationVersion(self):     
153                return self._cc_coordinateoperation.operationVersion
154
155        @operationVersion.setter
156        def operationVersion(self, value):     
157                        self._cc_coordinateoperation.operationVersion = value
158        @property
159        def sourceCRS(self):   
160                return self._cc_coordinateoperation.sourceCRS
161
162        @sourceCRS.setter
163        def sourceCRS(self, value):     
164                        self._cc_coordinateoperation.sourceCRS = value
165
166        def synchronize(self):
167                pass
168
169        def __key(self):
170                return (self.domainOfValidity, self.remarks, self.modifiedCoordinate, self.alias, self.scope, self.targetCRS, self.passThruOperation, self.identifier, self.name, self.concatOperation, self.coordinateOperationAccuracy, self.coordOperation, self.operationVersion, self.sourceCRS)
171
172        def __eq__(self, y):
173                if type(self) != type(y):
174                        return False
175                '''
176                Cannot compare classes which do not define a "__key" attribute
177                '''
178                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
179                        return self.__key() == y.__key()
180                return id(self) == id(y)
181
182        def __hash__(self):
183                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.