1 package nl.mineleni.openls.databinding.openls;
2
3 import nl.mineleni.openls.XmlNamespaceConstants;
4
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
30
31
32
33
34
35 public class Place implements XmlNamespaceConstants {
36
37
38
39 private static final long serialVersionUID = -3969318615339164005L;
40
41
42 private String type;
43
44
45 private String place;
46
47
48 private boolean hasType;
49
50
51 private boolean hasPlace;
52
53
54
55
56 public Place() {
57 this.hasType = false;
58 this.hasPlace = false;
59 }
60
61
62
63
64
65
66
67 public void setType(final String type) {
68 this.hasType = true;
69 this.type = type;
70 }
71
72
73
74
75
76
77 public String getType() {
78 return this.type;
79 }
80
81
82
83
84
85
86 public boolean hasType() {
87 return this.hasType;
88 }
89
90
91
92
93
94
95
96 public void setPlace(final String place) {
97 this.hasPlace = true;
98 this.place = place;
99 }
100
101
102
103
104
105
106 public String getPlace() {
107 return this.place;
108 }
109
110
111
112
113
114
115 public boolean hasPlace() {
116 return this.hasPlace;
117 }
118
119
120
121
122
123
124 @Override
125 public String toXML() {
126 String xml = "<" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX
127 + ":Place";
128 if (this.hasType()) {
129 xml += " type=\"" + this.getType() + "\"";
130 }
131 xml += ">";
132 if (this.hasPlace()) {
133 xml += this.getPlace();
134 }
135 xml += "</" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX + ":Place>";
136 return xml;
137 }
138 }