1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 public class LockedVehicle
30 extends InfoMessage
31 implements IWorldEvent, IWorldChangeEvent
32
33 {
34
35
36 public static final String PROTOTYPE =
37 "LOCKED {Id unreal_id} {Type text} {Location 0,0,0} ";
38
39
40
41
42
43
44 public LockedVehicle()
45 {
46 }
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 public LockedVehicle(
78 UnrealId Id, String Type, Location Location
79 ) {
80
81 this.Id = Id;
82
83 this.Type = Type;
84
85 this.Location = Location;
86
87 }
88
89
90
91
92
93
94 public LockedVehicle(LockedVehicle original) {
95
96 this.Id = original.getId()
97 ;
98
99 this.Type = original.getType()
100 ;
101
102 this.Location = original.getLocation()
103 ;
104
105 this.SimTime = original.getSimTime();
106 }
107
108
109 protected long SimTime;
110
111
112
113
114 @Override
115 public long getSimTime() {
116 return SimTime;
117 }
118
119
120
121
122 protected void setSimTime(long SimTime) {
123 this.SimTime = SimTime;
124 }
125
126
127
128
129
130 protected
131 UnrealId Id =
132 null;
133
134
135
136
137 public UnrealId getId()
138 {
139 return Id;
140 }
141
142
143
144
145
146 protected
147 String Type =
148 null;
149
150
151
152
153 public String getType()
154 {
155 return Type;
156 }
157
158
159
160
161
162 protected
163 Location Location =
164 null;
165
166
167
168
169 public Location getLocation()
170 {
171 return Location;
172 }
173
174
175 public String toString() {
176 return
177 super.toString() + "[" +
178
179 "Id = " + String.valueOf(getId()
180 ) + " | " +
181
182 "Type = " + String.valueOf(getType()
183 ) + " | " +
184
185 "Location = " + String.valueOf(getLocation()
186 ) + " | " +
187
188 "]";
189 }
190
191
192 public String toHtmlString() {
193 return super.toString() + "[<br/>" +
194
195 "<b>Id</b> = " + String.valueOf(getId()
196 ) + " <br/> " +
197
198 "<b>Type</b> = " + String.valueOf(getType()
199 ) + " <br/> " +
200
201 "<b>Location</b> = " + String.valueOf(getLocation()
202 ) + " <br/> " +
203
204 "<br/>]";
205 }
206
207 public String toJsonLiteral() {
208 return "LockedVehicle(null, "
209
210 + ")";
211 }
212
213
214
215
216
217
218
219
220
221
222 }
223