1
2
3
4
5
6
7 package nl.mineleni.openls.databinding.openls;
8
9 import nl.mineleni.openls.XmlNamespaceConstants;
10
11
12
13
14 public class SearchCentreDistance implements XmlNamespaceConstants {
15
16 private static final long serialVersionUID = 6413552036187763149L;
17
18
19 private String uom = null;
20
21
22 private double value = Double.NaN;
23
24
25 private double accuracy = Double.NaN;
26
27
28
29
30
31
32 public String getUom() {
33 return uom;
34 }
35
36
37
38
39
40
41
42 public void setUom(final String uom) {
43 this.uom = uom;
44 }
45
46
47
48
49
50
51 public double getValue() {
52 return value;
53 }
54
55
56
57
58
59
60
61 public void setValue(final double value) {
62 this.value = value;
63 }
64
65
66
67
68
69
70 public double getAccuracy() {
71 return accuracy;
72 }
73
74
75
76
77
78
79
80 public void setAccuracy(final double accuracy) {
81 this.accuracy = accuracy;
82 }
83
84
85
86
87
88
89 @Override
90 public String toXML() {
91
92 StringBuilder sb = new StringBuilder("<");
93 sb.append(XmlNamespaceConstants.OPENLS_NAMESPACE_PREFIX);
94 sb.append(":SearchCentreDistance");
95
96 if (this.uom != null) {
97 sb.append(" uom=\"");
98 sb.append(uom);
99 sb.append("\"");
100 }
101
102 if (!Double.isNaN(this.value)) {
103 sb.append(" value=\"");
104 sb.append(value);
105 sb.append("\"");
106 }
107
108 if (!Double.isNaN(this.accuracy)) {
109 sb.append(" accuracy=\"");
110 sb.append(accuracy);
111 sb.append("\"");
112 }
113 sb.append(" />");
114
115 return sb.toString();
116 }
117 }