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