source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19115_2006_metadata_corrigendum/data_quality_information/dq_positionalaccuracy.py @ 8457

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