1 package nl.geozet.openls.databinding.openls;
2
3 import nl.geozet.openls.databinding.common.XmlNamespaceConstants;
4
5 public class Place {
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 private String type;
22 private String place;
23
24 private boolean hasType;
25 private boolean hasPlace;
26
27 public Place() {
28 this.hasType = false;
29 this.hasPlace = false;
30 }
31
32 public void setType(String type) {
33 this.hasType = true;
34 this.type = type;
35 }
36
37 public String getType() {
38 return type;
39 }
40
41 public boolean hasType() {
42 return this.hasType;
43 }
44
45 public void setPlace(String place) {
46 this.hasPlace = true;
47 this.place = place;
48 }
49
50 public String getPlace() {
51 return place;
52 }
53
54 public boolean hasPlace() {
55 return this.hasPlace;
56 }
57
58 public String toXML() {
59 String xml = "<" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX
60 + ":Place";
61 if (hasType())
62 xml += " type=\"" + getType() + "\"";
63 xml += ">";
64 if (hasPlace())
65 xml += getPlace();
66 xml += "</" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX + ":Place>";
67 return xml;
68 }
69 }