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