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

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@8086
Revision 8086, 4.7 KB checked in by mnagni, 8 years ago (diff)

Fixed the multiple CI_Party INSERT in the DB
Refactored the ingestion thanks to the new eq method in the imported classes DB library

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