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
43
44
45 public class
46 InitializeObserver extends
47 CommandMessage
48
49 {
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 public InitializeObserver(
65 String Name, String Id) {
66
67 this.Name = Name;
68
69 this.Id = Id;
70
71 }
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86 public InitializeObserver() {
87 }
88
89
90
91
92
93
94 protected
95 String Name =
96 null;
97
98
99
100
101 public
102 String getName() {
103 return
104 Name;
105 }
106
107
108
109
110
111 public InitializeObserver setName(String Name) {
112 this.Name = Name;
113 return this;
114 }
115
116
117
118 protected
119 String Id =
120 null;
121
122
123
124
125 public
126 String getId() {
127 return
128 Id;
129 }
130
131
132
133
134
135 public InitializeObserver setId(String Id) {
136 this.Id = Id;
137 return this;
138 }
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161 public InitializeObserver(InitializeObserver original) {
162
163 this.Name=original.Name;
164
165 this.Id=original.Id;
166
167 }
168
169
170
171
172 public String toString() {
173 return
174
175 toMessage();
176
177 }
178
179 public String toHtmlString() {
180 return super.toString() +
181
182 "<b>Name</b> : " +
183 String.valueOf(Name) +
184 " <br/> " +
185
186 "<b>Id</b> : " +
187 String.valueOf(Id) +
188 " <br/> " +
189 "";
190 }
191
192
193
194 public String toMessage() {
195 StringBuffer buf = new StringBuffer();
196 buf.append("INIT");
197
198 if (Name != null) {
199 buf.append(" {Name " + Name + "}");
200 }
201
202 if (Id != null) {
203 buf.append(" {Id " + Id + "}");
204 }
205
206 return buf.toString();
207 }
208
209 }
210
211