1
2
3
4
5
6
7
8
9
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbcommands;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32
33
34
35
36
37
38
39
40
41
42 public class
43 GetPath extends
44 CommandMessage
45
46 {
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 public GetPath(
63 String Id, UnrealId Target, Location Location) {
64
65 this.Id = Id;
66
67 this.Target = Target;
68
69 this.Location = Location;
70
71 }
72
73
74
75
76
77
78
79
80
81
82
83 public GetPath() {
84 }
85
86
87
88
89
90
91
92
93
94 protected
95 String Id =
96 null;
97
98
99
100
101
102
103
104 public
105 String getId() {
106 return
107 Id;
108 }
109
110
111
112
113
114
115
116
117 public GetPath setId(String Id) {
118 this.Id = Id;
119 return this;
120 }
121
122
123
124 protected
125 UnrealId Target =
126 null;
127
128
129
130
131 public
132 UnrealId getTarget() {
133 return
134 Target;
135 }
136
137
138
139
140
141 public GetPath setTarget(UnrealId Target) {
142 this.Target = Target;
143 return this;
144 }
145
146
147
148 protected
149 Location Location =
150 null;
151
152
153
154
155 public
156 Location getLocation() {
157 return
158 Location;
159 }
160
161
162
163
164
165 public GetPath setLocation(Location Location) {
166 this.Location = Location;
167 return this;
168 }
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191 public GetPath(GetPath original) {
192
193 this.Id=original.Id;
194
195 this.Target=original.Target;
196
197 this.Location=original.Location;
198
199 }
200
201
202
203
204 public String toString() {
205 return
206
207 toMessage();
208
209 }
210
211 public String toHtmlString() {
212 return super.toString() +
213
214 "<b>Id</b> : " +
215 String.valueOf(Id) +
216 " <br/> " +
217
218 "<b>Target</b> : " +
219 String.valueOf(Target) +
220 " <br/> " +
221
222 "<b>Location</b> : " +
223 String.valueOf(Location) +
224 " <br/> " +
225 "";
226 }
227
228
229
230 public String toMessage() {
231 StringBuffer buf = new StringBuffer();
232 buf.append("GETPATH");
233
234 if (Id != null) {
235 buf.append(" {Id " + Id + "}");
236 }
237
238 if (Target != null) {
239 buf.append(" {Target " + Target.getStringId() + "}");
240 }
241
242 if (Location != null) {
243 buf.append(" {Location " +
244 Location.getX() + "," +
245 Location.getY() + "," +
246 Location.getZ() + "}");
247 }
248
249 return buf.toString();
250 }
251
252 }
253
254