1 package cz.cuni.amis.pogamut.usar2004.communication.messages.usarcommands;
2
3 import cz.cuni.amis.pogamut.base.communication.messages.*;
4 import cz.cuni.amis.pogamut.usar2004.communication.messages.datatypes.CustomTypes.*;
5
6
7
8
9
10
11
12
13
14 public class GetGeo extends CommandMessage
15 {
16 public GetGeo(String Type, String Name)
17 {
18 this.Type = Type;
19 this.Name = Name;
20 }
21
22
23
24
25
26 public GetGeo()
27 {
28 }
29
30 protected String Type = null;
31
32 public String getType()
33 {
34 return Type;
35 }
36
37 public GetGeo setType(String Type)
38 {
39 this.Type = Type;
40 return this;
41 }
42
43
44
45
46
47
48 protected String Name = null;
49
50 public String getName()
51 {
52 return Name;
53 }
54
55 public GetGeo setName(String Name)
56 {
57 this.Name = Name;
58 return this;
59 }
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 public GetGeo(GetGeo original)
76 {
77 this.Type = original.Type;
78 this.Name = original.Name;
79 }
80
81 @Override
82 public String toString()
83 {
84 return toMessage();
85 }
86
87 public String toHtmlString()
88 {
89 return super.toString()
90 + "<b>Type</b> : "
91 + String.valueOf(Type)
92 + " <br/> "
93 + "<b>Name</b> : "
94 + String.valueOf(Name)
95 + " <br/> "
96 + "";
97 }
98
99 public String toMessage()
100 {
101 StringBuilder buf = new StringBuilder();
102
103 buf.append("GETGEO");
104
105 if(Type != null)
106 {
107 buf.append(" {Type ").append(Type).append("}");
108 }
109
110 if(Name != null)
111 {
112 buf.append(" {Name ").append(Name).append("}");
113 }
114 return buf.toString();
115 }
116 }