source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19103_2005_schema_language/basic_types/derived/units_of_measure/uomvolume.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19103_2005_schema_language/basic_types/derived/units_of_measure/uomvolume.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_19103_2005_schema_language.basic_types.derived.units_of_measure.unitofmeasure import  UnitOfMeasure
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:01
26
27@author: mnagni
28'''
29
30class UomVolume(UnitOfMeasure):
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._unitofmeasure = UnitOfMeasure()   
43
44                self.subunit = None
45                self.nameStandardUnit = None
46                self.scaleToStandardUnit = None
47                self.measureType = None
48                self.offsetToStandardUnit = None
49                self.uomName = None
50                self.formula = None
51                self.uomSymbol = None
52                super(UomVolume, self).__init__()
53        @property
54        def subunit(self):     
55                return self._unitofmeasure.subunit
56
57        @subunit.setter
58        def subunit(self, value):       
59                        self._unitofmeasure.subunit = value
60        @property
61        def nameStandardUnit(self):     
62                return self._unitofmeasure.nameStandardUnit
63
64        @nameStandardUnit.setter
65        def nameStandardUnit(self, value):     
66                        self._unitofmeasure.nameStandardUnit = value
67        @property
68        def scaleToStandardUnit(self): 
69                return self._unitofmeasure.scaleToStandardUnit
70
71        @scaleToStandardUnit.setter
72        def scaleToStandardUnit(self, value):   
73                        self._unitofmeasure.scaleToStandardUnit = value
74        @property
75        def measureType(self): 
76                return self._unitofmeasure.measureType
77
78        @measureType.setter
79        def measureType(self, value):   
80                        self._unitofmeasure.measureType = value
81        @property
82        def measure(self):     
83                return self._unitofmeasure.measure
84
85        @measure.setter
86        def measure(self, value):       
87                        self._unitofmeasure.measure = value
88        @property
89        def offsetToStandardUnit(self):
90                return self._unitofmeasure.offsetToStandardUnit
91
92        @offsetToStandardUnit.setter
93        def offsetToStandardUnit(self, value): 
94                        self._unitofmeasure.offsetToStandardUnit = value
95        @property
96        def uomName(self):     
97                return self._unitofmeasure.uomName
98
99        @uomName.setter
100        def uomName(self, value):       
101                        self._unitofmeasure.uomName = value
102        @property
103        def formula(self):     
104                return self._unitofmeasure.formula
105
106        @formula.setter
107        def formula(self, value):       
108                        self._unitofmeasure.formula = value
109        @property
110        def uomSymbol(self):   
111                return self._unitofmeasure.uomSymbol
112
113        @uomSymbol.setter
114        def uomSymbol(self, value):     
115                        self._unitofmeasure.uomSymbol = value
116
117        def synchronize(self):
118                pass
119
120        def __key(self):
121                return (self.subunit, self.nameStandardUnit, self.scaleToStandardUnit, self.measureType, self.measure, self.offsetToStandardUnit, self.uomName, self.formula, self.uomSymbol)
122
123        def __eq__(self, y):
124                if type(self) != type(y):
125                        return False
126                '''
127                Cannot compare classes which do not define a "__key" attribute
128                '''
129                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
130                        return self.__key() == y.__key()
131                return id(self) == id(y)
132
133        def __hash__(self):
134                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.