source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/topology/topological_primitive/tp_node.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/topology/topological_primitive/tp_node.py@8091
Revision 8091, 4.6 KB checked in by mnagni, 8 years ago (diff)

The migration process now includes
1) deployment_data files
2) XML document hash
3) full Dojo support


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_directednode import  TP_DirectedNode
22from ea_model.iso_19107_2003_spatial_schema.topology.topological_primitive.tp_primitive import  TP_Primitive
23from ascore.utils import has_value
24
25'''
26Created on 16-Feb-2012 16:18:07
27
28@author: mnagni
29'''
30
31class TP_Node(TP_DirectedNode,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_directednode = TP_DirectedNode()       
44        self._tp_primitive = TP_Primitive()     
45
46        self.topo = None
47        self._topo_tp_directedtopo = None
48        self._topo_tp_edge = None
49        self._topo_tp_node = None
50        self._topo_tp_solid = None
51        self._topo_tp_face = None
52        self.orientation = None
53        self.maximalComplex = None
54        self.spoke = []
55        self._isolated_tp_directedtopo = []
56        self._isolated_tp_edge = []
57        self._isolated_tp_node = []
58        self._isolated_tp_solid = []
59        self._isolated_tp_face = []
60        self.proxy = None
61        self._proxy_tp_directedface = None
62        self._proxy_tp_directednode = None
63        self._proxy_tp_directedsolid = None
64        self._proxy_tp_directededge = None
65        self._geometry_gm_orientableprimitive = None
66        self._geometry_gm_point = None
67        self._geometry_gm_solid = None
68        self.primitive = []
69        self.complex = []
70        self._container_tp_directedtopo = None
71        self._container_tp_edge = None
72        self._container_tp_node = None
73        self._container_tp_solid = None
74        self._container_tp_face = None
75        self.term = []
76        super(TP_Node, self).__init__()
77
78    @property
79    def topo(self):     
80        return self._tp_directednode.topo
81
82    @topo.setter
83    def topo(self, value):     
84            self._tp_directednode.topo = value
85
86    @property
87    def topo(self):     
88        return self._tp_directednode.topo
89
90    @topo.setter
91    def topo(self, value):     
92            self._tp_directednode.topo = value
93
94    @property
95    def orientation(self):     
96        return self._tp_directednode.orientation
97
98    @orientation.setter
99    def orientation(self, value):       
100            self._tp_directednode.orientation = value
101
102    @property
103    def maximalComplex(self):   
104        return self._tp_directednode.maximalComplex
105
106    @maximalComplex.setter
107    def maximalComplex(self, value):   
108            self._tp_directednode.maximalComplex = value
109
110    @property
111    def isolated(self): 
112        return self._tp_directednode.isolated
113
114    @isolated.setter
115    def isolated(self, value): 
116            self._tp_directednode.isolated = value
117
118    @property
119    def proxy(self):   
120        return self._tp_directednode.proxy
121
122    @proxy.setter
123    def proxy(self, value):     
124            self._tp_directednode.proxy = value
125
126    @property
127    def geometry(self): 
128        return self._tp_directednode.geometry
129
130    @geometry.setter
131    def geometry(self, value): 
132            self._tp_directednode.geometry = value
133
134    @property
135    def primitive(self):       
136        return self._tp_directednode.primitive
137
138    @primitive.setter
139    def primitive(self, value): 
140            self._tp_directednode.primitive = value
141
142    @property
143    def complex(self): 
144        return self._tp_directednode.complex
145
146    @complex.setter
147    def complex(self, value):   
148            self._tp_directednode.complex = value
149
150    @property
151    def container(self):       
152        return self._tp_directednode.container
153
154    @container.setter
155    def container(self, value): 
156            self._tp_directednode.container = value
157
158    @property
159    def term(self):     
160        return self._tp_directednode.term
161
162    @term.setter
163    def term(self, value):     
164            self._tp_directednode.term = value
165
166    def __key(self):
167        return (self.topo, self.topo, self.orientation, self.maximalComplex, self.spoke, self.isolated, self.proxy, self.proxy, self.geometry, self.primitive, self.complex, self.container, self.term)
168
169    def __eq__(self, y):
170        '''
171        Cannot compare classes which do not define a "__key" attribute
172        '''
173        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
174            return self.__key() == y.__key()
175        return id(self) == id(y)
176
177    def __hash__(self):
178        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.