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