source: mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_classificationattributetype.py @ 8087

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_classificationattributetype.py@8087
Revision 8087, 4.8 KB checked in by mnagni, 8 years ago (diff)

Imported a new DB library which fixes the MO_ObservationColleciton <--> CEDA_ObservationCollection problem

Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18from ea_model.iso_19109_2005_application_schema.general_feature_model.gf_attributetype import  GF_AttributeType
19from ascore.utils import has_value
20
21'''
22Created on 06-Feb-2012 15:59:43
23
24@author: mnagni
25'''
26
27class IF_ClassificationAttributeType(GF_AttributeType):
28    '''
29        Represents a data entity defined in a UML diagram and supposed to
30        be persisted in a relational database.
31 
32        This class has been genererated automatically using the Apache Velocity project.
33    '''
34    '''
35        Please note that any access to the inner attributes should be done using
36        the given get/set methods and NOT accessing them directly.
37    '''
38    def __init__(self):
39        self._gf_attributetype = GF_AttributeType()     
40
41        self.propertyTypeMetadata = []
42        self.valueDomain = None
43        self._characterizeBy_gf_locationalattributetype = []
44        self._characterizeBy_gf_thematicattributetype = []
45        self._characterizeBy_gf_metadataattributetype = []
46        self._characterizeBy_gf_spatialattributetype = []
47        self._characterizeBy_gf_temporalattributetype = []
48        self._characterizeBy_if_classificationattributetype = []
49        self.featureAttributeMetadata = []
50        self.memberName = None
51        self.constrainedBy = []
52        self.valueType = None
53        self.definition = None
54        self.theGF_FeatureType = None
55        self._characterize_gf_locationalattributetype = None
56        self._characterize_gf_thematicattributetype = None
57        self._characterize_gf_metadataattributetype = None
58        self._characterize_gf_spatialattributetype = None
59        self._characterize_gf_temporalattributetype = None
60        self._characterize_if_classificationattributetype = None
61        self.cardinality = None
62        super(IF_ClassificationAttributeType, self).__init__()
63
64    @property
65    def propertyTypeMetadata(self):
66        return self._gf_attributetype.propertyTypeMetadata
67
68    @propertyTypeMetadata.setter
69    def propertyTypeMetadata(self, value):
70            self._gf_attributetype.propertyTypeMetadata = value
71
72    @property
73    def valueDomain(self):
74        return self._gf_attributetype.valueDomain
75
76    @valueDomain.setter
77    def valueDomain(self, value):
78            self._gf_attributetype.valueDomain = value
79
80    @property
81    def characterizeBy(self):
82        return self._gf_attributetype.characterizeBy
83
84    @characterizeBy.setter
85    def characterizeBy(self, value):
86            self._gf_attributetype.characterizeBy = value
87
88    @property
89    def featureAttributeMetadata(self):
90        return self._gf_attributetype.featureAttributeMetadata
91
92    @featureAttributeMetadata.setter
93    def featureAttributeMetadata(self, value):
94            self._gf_attributetype.featureAttributeMetadata = value
95
96    @property
97    def memberName(self):
98        return self._gf_attributetype.memberName
99
100    @memberName.setter
101    def memberName(self, value):
102            self._gf_attributetype.memberName = value
103
104    @property
105    def constrainedBy(self):
106        return self._gf_attributetype.constrainedBy
107
108    @constrainedBy.setter
109    def constrainedBy(self, value):
110            self._gf_attributetype.constrainedBy = value
111
112    @property
113    def valueType(self):
114        return self._gf_attributetype.valueType
115
116    @valueType.setter
117    def valueType(self, value):
118            self._gf_attributetype.valueType = value
119
120    @property
121    def definition(self):
122        return self._gf_attributetype.definition
123
124    @definition.setter
125    def definition(self, value):
126            self._gf_attributetype.definition = value
127
128    @property
129    def theGF_FeatureType(self):
130        return self._gf_attributetype.theGF_FeatureType
131
132    @theGF_FeatureType.setter
133    def theGF_FeatureType(self, value):
134            self._gf_attributetype.theGF_FeatureType = value
135
136    @property
137    def characterize(self):
138        return self._gf_attributetype.characterize
139
140    @characterize.setter
141    def characterize(self, value):
142            self._gf_attributetype.characterize = value
143
144    @property
145    def cardinality(self):
146        return self._gf_attributetype.cardinality
147
148    @cardinality.setter
149    def cardinality(self, value):
150            self._gf_attributetype.cardinality = value
151
152    def __key(self):
153        return (self.propertyTypeMetadata, self.valueDomain, self.characterizeBy, self.featureAttributeMetadata, self.memberName, self.constrainedBy, self.valueType, self.definition, self.theGF_FeatureType, self.characterize, self.cardinality)
154
155    def __eq__(x, y):
156        '''
157        Cannot compare classes which do not define a "__key" attribute
158        '''
159        if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
160            return x.__key() == y.__key()
161        return id(x) == id(y)
162
163    def __hash__(self):
164        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.