source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/informative/spatial_examples_from_iso_19107/application_schema/topology_simple/simple_topology/ts_pointcomponent.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/simple_topology/ts_pointcomponent.py@8457
Revision 8457, 3.0 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_featurecomponent import  TS_FeatureComponent
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:03
26
27@author: mnagni
28'''
29
30class TS_PointComponent(TS_FeatureComponent):
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._ts_featurecomponent = TS_FeatureComponent()       
43
44                self.attribute = None
45                self.composite = None
46                self.isGlobal = None
47                self.localName = None
48                self.position = None
49                self.generator = None
50                super(TS_PointComponent, self).__init__()
51        @property
52        def attribute(self):   
53                return self._ts_featurecomponent.attribute
54
55        @attribute.setter
56        def attribute(self, value):     
57                        self._ts_featurecomponent.attribute = value
58        @property
59        def composite(self):   
60                return self._ts_featurecomponent.composite
61
62        @composite.setter
63        def composite(self, value):     
64                        self._ts_featurecomponent.composite = value
65        @property
66        def isGlobal(self):     
67                return self._ts_featurecomponent.isGlobal
68
69        @isGlobal.setter
70        def isGlobal(self, value):     
71                        self._ts_featurecomponent.isGlobal = value
72        @property
73        def component(self):   
74                return self._ts_featurecomponent.component
75
76        @component.setter
77        def component(self, value):     
78                        self._ts_featurecomponent.component = value
79        @property
80        def localName(self):   
81                return self._ts_featurecomponent.localName
82
83        @localName.setter
84        def localName(self, value):     
85                        self._ts_featurecomponent.localName = value
86        @property
87        def theTS_FeatureComponent(self):       
88                return self._ts_featurecomponent.theTS_FeatureComponent
89
90        @theTS_FeatureComponent.setter
91        def theTS_FeatureComponent(self, value):       
92                        self._ts_featurecomponent.theTS_FeatureComponent = value
93        @property
94        def acceptableClassList(self): 
95                return self._ts_featurecomponent.acceptableClassList
96
97        @acceptableClassList.setter
98        def acceptableClassList(self, value):   
99                        self._ts_featurecomponent.acceptableClassList = value
100        @property
101        def theme(self):       
102                return self._ts_featurecomponent.theme
103
104        @theme.setter
105        def theme(self, value):
106                        self._ts_featurecomponent.theme = value
107
108        def synchronize(self):
109                pass
110
111        def __key(self):
112                return (self.attribute, self.composite, self.isGlobal, self.component, self.localName, self.theTS_FeatureComponent, self.acceptableClassList, self.position, self.generator, self.theme)
113
114        def __eq__(self, y):
115                if type(self) != type(y):
116                        return False
117                '''
118                Cannot compare classes which do not define a "__key" attribute
119                '''
120                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
121                        return self.__key() == y.__key()
122                return id(self) == id(y)
123
124        def __hash__(self):
125                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.