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
36 public class Building implements XmlNamespaceConstants {
37
38
39
40 private static final long serialVersionUID = -6760538060544745111L;
41
42
43
44 private String number;
45
46
47 private String subdivision;
48
49
50
51 private String buildingName;
52
53
54 private boolean hasNumber;
55
56
57 private boolean hasSubdivision;
58
59
60 private boolean hasBuildingName;
61
62
63
64
65 public Building() {
66 this.hasNumber = false;
67 this.hasSubdivision = false;
68 this.hasBuildingName = false;
69 }
70
71
72
73
74
75
76
77 public void setNumber(final String number) {
78 this.hasNumber = true;
79 this.number = number;
80 }
81
82
83
84
85
86
87 public String getNumber() {
88 return this.number;
89 }
90
91
92
93
94
95
96 public boolean hasNumber() {
97 return this.hasNumber;
98 }
99
100
101
102
103
104
105
106 public void setSubdivision(final String subdivision) {
107 this.hasSubdivision = true;
108 this.subdivision = subdivision;
109 }
110
111
112
113
114
115
116 public String getSubdivision() {
117 return this.subdivision;
118 }
119
120
121
122
123
124
125 public boolean hasSubdivision() {
126 return this.hasSubdivision;
127 }
128
129
130
131
132
133
134
135 public void setBuildingName(final String buildingName) {
136 this.hasBuildingName = true;
137 this.buildingName = buildingName;
138 }
139
140
141
142
143
144
145 public String getBuildingName() {
146 return this.buildingName;
147 }
148
149
150
151
152
153
154 public boolean hasBuildingName() {
155 return this.hasBuildingName;
156 }
157
158
159
160
161
162
163 @Override
164 public String toXML() {
165 String xml = "<" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX
166 + ":Building";
167 if (this.hasNumber()) {
168 xml += " number=\"" + this.getNumber() + "\"";
169 }
170 xml += ">";
171 xml += "</" + XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX
172 + ":Building>";
173 return xml;
174 }
175 }