1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | from ea_model.iso_19107_2003_spatial_schema.geometry.geometric_primitive.gm_curve import GM_Curve |
---|
22 | from ascore.utils import has_value, collectionProofHash |
---|
23 | |
---|
24 | ''' |
---|
25 | Created on 10-Jul-2012 14:15:03 |
---|
26 | |
---|
27 | @author: mnagni |
---|
28 | ''' |
---|
29 | |
---|
30 | class LineString(GM_Curve): |
---|
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._gm_curve = GM_Curve() |
---|
43 | |
---|
44 | self.CRS = None |
---|
45 | self.orientation = None |
---|
46 | self.proxy = None |
---|
47 | self.primitive = None |
---|
48 | super(LineString, self).__init__() |
---|
49 | @property |
---|
50 | def topology(self): |
---|
51 | return self._gm_curve.topology |
---|
52 | |
---|
53 | @topology.setter |
---|
54 | def topology(self, value): |
---|
55 | self._gm_curve.topology = value |
---|
56 | @property |
---|
57 | def segment(self): |
---|
58 | return self._gm_curve.segment |
---|
59 | |
---|
60 | @segment.setter |
---|
61 | def segment(self, value): |
---|
62 | self._gm_curve.segment = value |
---|
63 | @property |
---|
64 | def containedPrimitive(self): |
---|
65 | return self._gm_curve.containedPrimitive |
---|
66 | |
---|
67 | @containedPrimitive.setter |
---|
68 | def containedPrimitive(self, value): |
---|
69 | self._gm_curve.containedPrimitive = value |
---|
70 | @property |
---|
71 | def composite(self): |
---|
72 | return self._gm_curve.composite |
---|
73 | |
---|
74 | @composite.setter |
---|
75 | def composite(self, value): |
---|
76 | self._gm_curve.composite = value |
---|
77 | @property |
---|
78 | def composite(self): |
---|
79 | return self._gm_curve.composite |
---|
80 | |
---|
81 | @composite.setter |
---|
82 | def composite(self, value): |
---|
83 | self._gm_curve.composite = value |
---|
84 | @property |
---|
85 | def CRS(self): |
---|
86 | return self._gm_curve.CRS |
---|
87 | |
---|
88 | @CRS.setter |
---|
89 | def CRS(self, value): |
---|
90 | self._gm_curve.CRS = value |
---|
91 | @property |
---|
92 | def orientation(self): |
---|
93 | return self._gm_curve.orientation |
---|
94 | |
---|
95 | @orientation.setter |
---|
96 | def orientation(self, value): |
---|
97 | self._gm_curve.orientation = value |
---|
98 | @property |
---|
99 | def proxy(self): |
---|
100 | return self._gm_curve.proxy |
---|
101 | |
---|
102 | @proxy.setter |
---|
103 | def proxy(self, value): |
---|
104 | self._gm_curve.proxy = value |
---|
105 | @property |
---|
106 | def containingPrimitive(self): |
---|
107 | return self._gm_curve.containingPrimitive |
---|
108 | |
---|
109 | @containingPrimitive.setter |
---|
110 | def containingPrimitive(self, value): |
---|
111 | self._gm_curve.containingPrimitive = value |
---|
112 | @property |
---|
113 | def complex(self): |
---|
114 | return self._gm_curve.complex |
---|
115 | |
---|
116 | @complex.setter |
---|
117 | def complex(self, value): |
---|
118 | self._gm_curve.complex = value |
---|
119 | @property |
---|
120 | def primitive(self): |
---|
121 | return self._gm_curve.primitive |
---|
122 | |
---|
123 | @primitive.setter |
---|
124 | def primitive(self, value): |
---|
125 | self._gm_curve.primitive = value |
---|
126 | |
---|
127 | def synchronize(self): |
---|
128 | pass |
---|
129 | |
---|
130 | def __key(self): |
---|
131 | return (self.topology, self.segment, self.containedPrimitive, self.composite, self.composite, self.CRS, self.orientation, self.proxy, self.containingPrimitive, self.complex, self.primitive) |
---|
132 | |
---|
133 | def __eq__(self, y): |
---|
134 | if type(self) != type(y): |
---|
135 | return False |
---|
136 | ''' |
---|
137 | Cannot compare classes which do not define a "__key" attribute |
---|
138 | ''' |
---|
139 | if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |
---|
140 | return self.__key() == y.__key() |
---|
141 | return id(self) == id(y) |
---|
142 | |
---|
143 | def __hash__(self): |
---|
144 | return collectionProofHash(self.__key()) |
---|