source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19123_2005_coverages/coverages/segmented_curve/cv_segmentedcurvecoverage.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19123_2005_coverages/coverages/segmented_curve/cv_segmentedcurvecoverage.py@8457
Revision 8457, 3.1 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_19123_2005_coverages.coverages.coverage_core.cv_continuouscoverage import  CV_ContinuousCoverage
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:07
26
27@author: mnagni
28'''
29
30class CV_SegmentedCurveCoverage(CV_ContinuousCoverage):
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._cv_continuouscoverage = CV_ContinuousCoverage()   
43
44                self.interpolationType = None
45                self.CRS = None
46                self.commonPointRule = None
47                self.rangeType = None
48                self.element = []
49                self.interpolationParametersType = None
50                super(CV_SegmentedCurveCoverage, self).__init__()
51        @property
52        def domainExtent(self):
53                return self._cv_continuouscoverage.domainExtent
54
55        @domainExtent.setter
56        def domainExtent(self, value): 
57                        self._cv_continuouscoverage.domainExtent = value
58        @property
59        def interpolationType(self):   
60                return self._cv_continuouscoverage.interpolationType
61
62        @interpolationType.setter
63        def interpolationType(self, value):     
64                        self._cv_continuouscoverage.interpolationType = value
65        @property
66        def CRS(self): 
67                return self._cv_continuouscoverage.CRS
68
69        @CRS.setter
70        def CRS(self, value):   
71                        self._cv_continuouscoverage.CRS = value
72        @property
73        def domainElement(self):       
74                return self._cv_continuouscoverage.domainElement
75
76        @domainElement.setter
77        def domainElement(self, value):
78                        self._cv_continuouscoverage.domainElement = value
79        @property
80        def rangeType(self):   
81                return self._cv_continuouscoverage.rangeType
82
83        @rangeType.setter
84        def rangeType(self, value):     
85                        self._cv_continuouscoverage.rangeType = value
86        @property
87        def element(self):     
88                return self._cv_continuouscoverage.element
89
90        @element.setter
91        def element(self, value):       
92                        self._cv_continuouscoverage.element = value
93        @property
94        def rangeElement(self):
95                return self._cv_continuouscoverage.rangeElement
96
97        @rangeElement.setter
98        def rangeElement(self, value): 
99                        self._cv_continuouscoverage.rangeElement = value
100        @property
101        def interpolationParametersType(self): 
102                return self._cv_continuouscoverage.interpolationParametersType
103
104        @interpolationParametersType.setter
105        def interpolationParametersType(self, value):   
106                        self._cv_continuouscoverage.interpolationParametersType = value
107
108        def synchronize(self):
109                pass
110
111        def __key(self):
112                return (self.domainExtent, self.interpolationType, self.CRS, self.domainElement, self.commonPointRule, self.rangeType, self.element, self.element, self.rangeElement, self.interpolationParametersType)
113
114        def __eq__(self, y):
115                if type(self) != type(y):
116                        return False
117                '''
118                Cannot compare classes which do not define a "__key" attribute
119                '''
120                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
121                        return self.__key() == y.__key()
122                return id(self) == id(y)
123
124        def __hash__(self):
125                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.