source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19133_tracking_and_navigation/network/combined_networks/nt_transfer.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/iso_19133_tracking_and_navigation/network/combined_networks/nt_transfer.py@8457
Revision 8457, 3.2 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_19133_tracking_and_navigation.network.turn_and_junction.nt_turn import  NT_Turn
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:06
26
27@author: mnagni
28'''
29
30class NT_Transfer(NT_Turn):
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._nt_turn = NT_Turn()       
43
44                self.entryCount = None
45                self.toLink = None
46                self.junction = None
47                self.exitCount = None
48                self.turnDirection = None
49                self.isManuever = None
50                self.isTraversable = None
51                self.fromLink = None
52                super(NT_Transfer, self).__init__()
53        @property
54        def constraint(self):   
55                return self._nt_turn.constraint
56
57        @constraint.setter
58        def constraint(self, value):   
59                        self._nt_turn.constraint = value
60        @property
61        def entryCount(self):   
62                return self._nt_turn.entryCount
63
64        @entryCount.setter
65        def entryCount(self, value):   
66                        self._nt_turn.entryCount = value
67        @property
68        def toLink(self):       
69                return self._nt_turn.toLink
70
71        @toLink.setter
72        def toLink(self, value):       
73                        self._nt_turn.toLink = value
74        @property
75        def advisory(self):     
76                return self._nt_turn.advisory
77
78        @advisory.setter
79        def advisory(self, value):     
80                        self._nt_turn.advisory = value
81        @property
82        def costedTurn(self):   
83                return self._nt_turn.costedTurn
84
85        @costedTurn.setter
86        def costedTurn(self, value):   
87                        self._nt_turn.costedTurn = value
88        @property
89        def exitCount(self):   
90                return self._nt_turn.exitCount
91
92        @exitCount.setter
93        def exitCount(self, value):     
94                        self._nt_turn.exitCount = value
95        @property
96        def maneuver(self):     
97                return self._nt_turn.maneuver
98
99        @maneuver.setter
100        def maneuver(self, value):     
101                        self._nt_turn.maneuver = value
102        @property
103        def turnDirection(self):       
104                return self._nt_turn.turnDirection
105
106        @turnDirection.setter
107        def turnDirection(self, value):
108                        self._nt_turn.turnDirection = value
109        @property
110        def isManuever(self):   
111                return self._nt_turn.isManuever
112
113        @isManuever.setter
114        def isManuever(self, value):   
115                        self._nt_turn.isManuever = value
116        @property
117        def isTraversable(self):       
118                return self._nt_turn.isTraversable
119
120        @isTraversable.setter
121        def isTraversable(self, value):
122                        self._nt_turn.isTraversable = value
123        @property
124        def fromLink(self):     
125                return self._nt_turn.fromLink
126
127        @fromLink.setter
128        def fromLink(self, value):     
129                        self._nt_turn.fromLink = value
130
131        def synchronize(self):
132                pass
133
134        def __key(self):
135                return (self.constraint, self.entryCount, self.toLink, self.advisory, self.junction, self.costedTurn, self.exitCount, self.maneuver, self.turnDirection, self.isManuever, self.isTraversable, self.fromLink)
136
137        def __eq__(self, y):
138                if type(self) != type(y):
139                        return False
140                '''
141                Cannot compare classes which do not define a "__key" attribute
142                '''
143                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
144                        return self.__key() == y.__key()
145                return id(self) == id(y)
146
147        def __hash__(self):
148                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.