source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19109_2005_application_schema/general_feature_model/gf_locationalattributetype.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19109_2005_application_schema/general_feature_model/gf_locationalattributetype.py@8457
Revision 8457, 3.7 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_19109_2005_application_schema.general_feature_model.gf_attributetype import  GF_AttributeType
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:05
26
27@author: mnagni
28'''
29
30class GF_LocationalAttributeType(GF_AttributeType):
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._gf_attributetype = GF_AttributeType()     
43
44                self.valueDomain = None
45                self.memberName = None
46                self.valueType = None
47                self.definition = None
48                self.theGF_FeatureType = None
49                self.characterize = None
50                self.cardinality = None
51                super(GF_LocationalAttributeType, self).__init__()
52        @property
53        def propertyTypeMetadata(self):
54                return self._gf_attributetype.propertyTypeMetadata
55
56        @propertyTypeMetadata.setter
57        def propertyTypeMetadata(self, value): 
58                        self._gf_attributetype.propertyTypeMetadata = value
59        @property
60        def valueDomain(self): 
61                return self._gf_attributetype.valueDomain
62
63        @valueDomain.setter
64        def valueDomain(self, value):   
65                        self._gf_attributetype.valueDomain = value
66        @property
67        def characterizeBy(self):       
68                return self._gf_attributetype.characterizeBy
69
70        @characterizeBy.setter
71        def characterizeBy(self, value):       
72                        self._gf_attributetype.characterizeBy = value
73        @property
74        def featureAttributeMetadata(self):     
75                return self._gf_attributetype.featureAttributeMetadata
76
77        @featureAttributeMetadata.setter
78        def featureAttributeMetadata(self, value):     
79                        self._gf_attributetype.featureAttributeMetadata = value
80        @property
81        def constrainedBy(self):       
82                return self._gf_attributetype.constrainedBy
83
84        @constrainedBy.setter
85        def constrainedBy(self, value):
86                        self._gf_attributetype.constrainedBy = value
87        @property
88        def memberName(self):   
89                return self._gf_attributetype.memberName
90
91        @memberName.setter
92        def memberName(self, value):   
93                        self._gf_attributetype.memberName = value
94        @property
95        def valueType(self):   
96                return self._gf_attributetype.valueType
97
98        @valueType.setter
99        def valueType(self, value):     
100                        self._gf_attributetype.valueType = value
101        @property
102        def definition(self):   
103                return self._gf_attributetype.definition
104
105        @definition.setter
106        def definition(self, value):   
107                        self._gf_attributetype.definition = value
108        @property
109        def theGF_FeatureType(self):   
110                return self._gf_attributetype.theGF_FeatureType
111
112        @theGF_FeatureType.setter
113        def theGF_FeatureType(self, value):     
114                        self._gf_attributetype.theGF_FeatureType = value
115        @property
116        def characterize(self):
117                return self._gf_attributetype.characterize
118
119        @characterize.setter
120        def characterize(self, value): 
121                        self._gf_attributetype.characterize = value
122        @property
123        def cardinality(self): 
124                return self._gf_attributetype.cardinality
125
126        @cardinality.setter
127        def cardinality(self, value):   
128                        self._gf_attributetype.cardinality = value
129
130        def synchronize(self):
131                pass
132
133        def __key(self):
134                return (self.propertyTypeMetadata, self.valueDomain, self.characterizeBy, self.featureAttributeMetadata, self.constrainedBy, self.memberName, self.valueType, self.definition, self.theGF_FeatureType, self.characterize, self.cardinality)
135
136        def __eq__(self, y):
137                if type(self) != type(y):
138                        return False
139                '''
140                Cannot compare classes which do not define a "__key" attribute
141                '''
142                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
143                        return self.__key() == y.__key()
144                return id(self) == id(y)
145
146        def __hash__(self):
147                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.