Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java @ 3747:a33df17ac9bb
Use getGaugeValue method also for aeo and datum
flys-artifacts/trunk@5432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Sep 2012 13:07:59 +0000 |
parents | 0edc05642fa4 |
children | 99f80469ba2b |
comparison
equal
deleted
inserted
replaced
3746:7bc61f4ab26b | 3747:a33df17ac9bb |
---|---|
107 } | 107 } |
108 if (maxq != null) { | 108 if (maxq != null) { |
109 ec.addAttr(eg, "maxq", maxq, true); | 109 ec.addAttr(eg, "maxq", maxq, true); |
110 } | 110 } |
111 | 111 |
112 ec.addAttr(eg, "aeo", Double.toString(gauge.getAeo().doubleValue()), true); | 112 ec.addAttr(eg, "aeo", getGaugeValue(gauge.getAeo()), true); |
113 ec.addAttr(eg, "datum", Double.toString(gauge.getDatum().doubleValue()), true); | 113 ec.addAttr(eg, "datum", getGaugeValue(gauge.getDatum()), true); |
114 | 114 |
115 egs.appendChild(eg); | 115 egs.appendChild(eg); |
116 } | 116 } |
117 | 117 |
118 go.appendChild(r); | 118 go.appendChild(r); |
120 result.appendChild(go); | 120 result.appendChild(go); |
121 | 121 |
122 return result; | 122 return result; |
123 } | 123 } |
124 | 124 |
125 /** | |
126 * Returns a Double from a BigDecimal value or null if value is null | |
127 */ | |
125 private String getGaugeValue(BigDecimal value) { | 128 private String getGaugeValue(BigDecimal value) { |
126 if (value == null) { | 129 if (value == null) { |
127 return null; | 130 return null; |
128 } | 131 } |
129 return Double.toString(value.doubleValue()); | 132 return Double.toString(value.doubleValue()); |