source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19107_2003_spatial_schema/topology/topological_primitive/tp_solid.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19107_2003_spatial_schema/topology/topological_primitive/tp_solid.py@8457
Revision 8457, 3.4 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_19107_2003_spatial_schema.topology.topological_primitive.tp_directedsolid import  TP_DirectedSolid
22from ea_model.iso_19107_2003_spatial_schema.topology.topological_primitive.tp_primitive import  TP_Primitive
23from ascore.utils import has_value, collectionProofHash
24
25'''
26Created on 10-Jul-2012 14:15:07
27
28@author: mnagni
29'''
30
31class TP_Solid(TP_DirectedSolid,TP_Primitive):
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._tp_directedsolid = TP_DirectedSolid()     
44                self._tp_primitive = TP_Primitive()     
45
46                self.topo = None
47                self.topo = None
48                self.orientation = None
49                self.maximalComplex = None
50                self.proxy = None
51                self.proxy = None
52                self.geometry = None
53                self.boundary = []
54                self.container = None
55                super(TP_Solid, self).__init__()
56        @property
57        def topo(self):
58                return self._tp_directedsolid.topo
59
60        @topo.setter
61        def topo(self, value): 
62                        self._tp_directedsolid.topo = value
63        @property
64        def topo(self):
65                return self._tp_directedsolid.topo
66
67        @topo.setter
68        def topo(self, value): 
69                        self._tp_directedsolid.topo = value
70        @property
71        def orientation(self): 
72                return self._tp_directedsolid.orientation
73
74        @orientation.setter
75        def orientation(self, value):   
76                        self._tp_directedsolid.orientation = value
77        @property
78        def maximalComplex(self):       
79                return self._tp_directedsolid.maximalComplex
80
81        @maximalComplex.setter
82        def maximalComplex(self, value):       
83                        self._tp_directedsolid.maximalComplex = value
84        @property
85        def hub(self): 
86                return self._tp_directedsolid.hub
87
88        @hub.setter
89        def hub(self, value):   
90                        self._tp_directedsolid.hub = value
91        @property
92        def isolated(self):     
93                return self._tp_directedsolid.isolated
94
95        @isolated.setter
96        def isolated(self, value):     
97                        self._tp_directedsolid.isolated = value
98        @property
99        def proxy(self):       
100                return self._tp_directedsolid.proxy
101
102        @proxy.setter
103        def proxy(self, value):
104                        self._tp_directedsolid.proxy = value
105        @property
106        def geometry(self):     
107                return self._tp_directedsolid.geometry
108
109        @geometry.setter
110        def geometry(self, value):     
111                        self._tp_directedsolid.geometry = value
112        @property
113        def complex(self):     
114                return self._tp_directedsolid.complex
115
116        @complex.setter
117        def complex(self, value):       
118                        self._tp_directedsolid.complex = value
119        @property
120        def container(self):   
121                return self._tp_directedsolid.container
122
123        @container.setter
124        def container(self, value):     
125                        self._tp_directedsolid.container = value
126        @property
127        def term(self):
128                return self._tp_directedsolid.term
129
130        @term.setter
131        def term(self, value): 
132                        self._tp_directedsolid.term = value
133
134        def synchronize(self):
135                pass
136
137        def __key(self):
138                return (self.topo, self.topo, self.orientation, self.maximalComplex, self.hub, self.isolated, self.proxy, self.proxy, self.geometry, self.complex, self.boundary, self.container, self.term)
139
140        def __eq__(self, y):
141                if type(self) != type(y):
142                        return False
143                '''
144                Cannot compare classes which do not define a "__key" attribute
145                '''
146                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
147                        return self.__key() == y.__key()
148                return id(self) == id(y)
149
150        def __hash__(self):
151                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.