source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19123_2005_coverages/coverages/hexagonal_grid/cv_hexagonalgridcoverage.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/hexagonal_grid/cv_hexagonalgridcoverage.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:10
26
27@author: mnagni
28'''
29
30class CV_HexagonalGridCoverage(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                self.source = None
51                super(CV_HexagonalGridCoverage, self).__init__()
52        @property
53        def domainExtent(self):
54                return self._cv_continuouscoverage.domainExtent
55
56        @domainExtent.setter
57        def domainExtent(self, value): 
58                        self._cv_continuouscoverage.domainExtent = value
59        @property
60        def CRS(self): 
61                return self._cv_continuouscoverage.CRS
62
63        @CRS.setter
64        def CRS(self, value):   
65                        self._cv_continuouscoverage.CRS = value
66        @property
67        def domainElement(self):       
68                return self._cv_continuouscoverage.domainElement
69
70        @domainElement.setter
71        def domainElement(self, value):
72                        self._cv_continuouscoverage.domainElement = value
73        @property
74        def commonPointRule(self):     
75                return self._cv_continuouscoverage.commonPointRule
76
77        @commonPointRule.setter
78        def commonPointRule(self, value):       
79                        self._cv_continuouscoverage.commonPointRule = value
80        @property
81        def rangeType(self):   
82                return self._cv_continuouscoverage.rangeType
83
84        @rangeType.setter
85        def rangeType(self, value):     
86                        self._cv_continuouscoverage.rangeType = value
87        @property
88        def element(self):     
89                return self._cv_continuouscoverage.element
90
91        @element.setter
92        def element(self, value):       
93                        self._cv_continuouscoverage.element = value
94        @property
95        def rangeElement(self):
96                return self._cv_continuouscoverage.rangeElement
97
98        @rangeElement.setter
99        def rangeElement(self, value): 
100                        self._cv_continuouscoverage.rangeElement = value
101        @property
102        def interpolationParametersType(self): 
103                return self._cv_continuouscoverage.interpolationParametersType
104
105        @interpolationParametersType.setter
106        def interpolationParametersType(self, value):   
107                        self._cv_continuouscoverage.interpolationParametersType = value
108
109        def synchronize(self):
110                pass
111
112        def __key(self):
113                return (self.domainExtent, self.interpolationType, self.CRS, self.domainElement, self.commonPointRule, self.rangeType, self.element, self.element, self.rangeElement, self.interpolationParametersType, self.source)
114
115        def __eq__(self, y):
116                if type(self) != type(y):
117                        return False
118                '''
119                Cannot compare classes which do not define a "__key" attribute
120                '''
121                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
122                        return self.__key() == y.__key()
123                return id(self) == id(y)
124
125        def __hash__(self):
126                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.