source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/informative/spatial_examples_from_iso_19107/application_schema/topology_simple/feature_topology/ft_face.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/informative/spatial_examples_from_iso_19107/application_schema/topology_simple/feature_topology/ft_face.py@8457
Revision 8457, 3.5 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.informative.spatial_examples_from_iso_19107.application_schema.topology_simple.simple_topology.ts_surfacecomponent import  TS_SurfaceComponent
22from ea_model.informative.spatial_examples_from_iso_19107.application_schema.topology_simple.feature_topology.ft_primitive import  FT_Primitive
23from ascore.utils import has_value, collectionProofHash
24
25'''
26Created on 10-Jul-2012 14:15:03
27
28@author: mnagni
29'''
30
31class FT_Face(FT_Primitive,TS_SurfaceComponent):
32        '''
33                Represents a data entity defined in a UML diagram and supposed to
34                be persisted in a relational database.
35 
36                This class has been genererated automatically using the Apache Velocity project.
37        '''
38        '''
39                Please note that any access to the inner attributes should be done using
40                the given get/set methods and NOT accessing them directly.
41        '''
42        def __init__(self):
43                self._ts_surfacecomponent = TS_SurfaceComponent()       
44                self._ft_primitive = FT_Primitive()     
45
46                self.attribute = None
47                self.composite = None
48                self.isGlobal = None
49                self.orientation = None
50                self.localName = None
51                super(FT_Face, self).__init__()
52        @property
53        def attribute(self):   
54                return self._ts_surfacecomponent.attribute
55
56        @attribute.setter
57        def attribute(self, value):     
58                        self._ts_surfacecomponent.attribute = value
59        @property
60        def composite(self):   
61                return self._ts_surfacecomponent.composite
62
63        @composite.setter
64        def composite(self, value):     
65                        self._ts_surfacecomponent.composite = value
66        @property
67        def isGlobal(self):     
68                return self._ts_surfacecomponent.isGlobal
69
70        @isGlobal.setter
71        def isGlobal(self, value):     
72                        self._ts_surfacecomponent.isGlobal = value
73        @property
74        def component(self):   
75                return self._ts_surfacecomponent.component
76
77        @component.setter
78        def component(self, value):     
79                        self._ts_surfacecomponent.component = value
80        @property
81        def localName(self):   
82                return self._ts_surfacecomponent.localName
83
84        @localName.setter
85        def localName(self, value):     
86                        self._ts_surfacecomponent.localName = value
87        @property
88        def theTS_FeatureComponent(self):       
89                return self._ts_surfacecomponent.theTS_FeatureComponent
90
91        @theTS_FeatureComponent.setter
92        def theTS_FeatureComponent(self, value):       
93                        self._ts_surfacecomponent.theTS_FeatureComponent = value
94        @property
95        def complex(self):     
96                return self._ft_primitive.complex
97
98        @complex.setter
99        def complex(self, value):       
100                        self._ft_primitive.complex = value
101        @property
102        def acceptableClassList(self): 
103                return self._ts_surfacecomponent.acceptableClassList
104
105        @acceptableClassList.setter
106        def acceptableClassList(self, value):   
107                        self._ts_surfacecomponent.acceptableClassList = value
108        @property
109        def generator(self):   
110                return self._ts_surfacecomponent.generator
111
112        @generator.setter
113        def generator(self, value):     
114                        self._ts_surfacecomponent.generator = value
115        @property
116        def theme(self):       
117                return self._ts_surfacecomponent.theme
118
119        @theme.setter
120        def theme(self, value):
121                        self._ts_surfacecomponent.theme = value
122
123        def synchronize(self):
124                pass
125
126        def __key(self):
127                return (self.attribute, self.composite, self.isGlobal, self.orientation, self.component, self.localName, self.theTS_FeatureComponent, self.complex, self.acceptableClassList, self.generator, self.theme)
128
129        def __eq__(self, y):
130                if type(self) != type(y):
131                        return False
132                '''
133                Cannot compare classes which do not define a "__key" attribute
134                '''
135                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
136                        return self.__key() == y.__key()
137                return id(self) == id(y)
138
139        def __hash__(self):
140                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.