source: mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/derived/units_of_measure/uomangle.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19103_2005_schema_language/basic_types/derived/units_of_measure/uomangle.py@8091
Revision 8091, 3.4 KB checked in by mnagni, 8 years ago (diff)

The migration process now includes
1) deployment_data files
2) XML document hash
3) full Dojo support


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
23
24'''
25Created on 16-Feb-2012 16:18:06
26
27@author: mnagni
28'''
29
30class UomAngle(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.measure = []
49        self.offsetToStandardUnit = None
50        self.uomName = None
51        self.formula = None
52        self.uomSymbol = None
53        super(UomAngle, self).__init__()
54
55    @property
56    def subunit(self): 
57        return self._unitofmeasure.subunit
58
59    @subunit.setter
60    def subunit(self, value):   
61            self._unitofmeasure.subunit = value
62
63    @property
64    def nameStandardUnit(self): 
65        return self._unitofmeasure.nameStandardUnit
66
67    @nameStandardUnit.setter
68    def nameStandardUnit(self, value): 
69            self._unitofmeasure.nameStandardUnit = value
70
71    @property
72    def scaleToStandardUnit(self):     
73        return self._unitofmeasure.scaleToStandardUnit
74
75    @scaleToStandardUnit.setter
76    def scaleToStandardUnit(self, value):       
77            self._unitofmeasure.scaleToStandardUnit = value
78
79    @property
80    def measureType(self):     
81        return self._unitofmeasure.measureType
82
83    @measureType.setter
84    def measureType(self, value):       
85            self._unitofmeasure.measureType = value
86
87    @property
88    def measure(self): 
89        return self._unitofmeasure.measure
90
91    @measure.setter
92    def measure(self, value):   
93            self._unitofmeasure.measure = value
94
95    @property
96    def offsetToStandardUnit(self):     
97        return self._unitofmeasure.offsetToStandardUnit
98
99    @offsetToStandardUnit.setter
100    def offsetToStandardUnit(self, value):     
101            self._unitofmeasure.offsetToStandardUnit = value
102
103    @property
104    def uomName(self): 
105        return self._unitofmeasure.uomName
106
107    @uomName.setter
108    def uomName(self, value):   
109            self._unitofmeasure.uomName = value
110
111    @property
112    def formula(self): 
113        return self._unitofmeasure.formula
114
115    @formula.setter
116    def formula(self, value):   
117            self._unitofmeasure.formula = value
118
119    @property
120    def uomSymbol(self):       
121        return self._unitofmeasure.uomSymbol
122
123    @uomSymbol.setter
124    def uomSymbol(self, value): 
125            self._unitofmeasure.uomSymbol = value
126
127    def __key(self):
128        return (self.subunit, self.nameStandardUnit, self.scaleToStandardUnit, self.measureType, self.measure, self.offsetToStandardUnit, self.uomName, self.formula, self.uomSymbol)
129
130    def __eq__(self, y):
131        '''
132        Cannot compare classes which do not define a "__key" attribute
133        '''
134        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
135            return self.__key() == y.__key()
136        return id(self) == id(y)
137
138    def __hash__(self):
139        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.