Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java @ 4326:87362ba26c72
Extract the gauge name from the riverservice response
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 30 Oct 2012 13:03:20 +0100 |
parents | b6f2ecaa6704 |
children | 45d310b41c23 |
comparison
equal
deleted
inserted
replaced
4325:7320830987a3 | 4326:87362ba26c72 |
---|---|
231 String mstarttime = stationele.getAttributeNS( | 231 String mstarttime = stationele.getAttributeNS( |
232 ArtifactNamespaceContext.NAMESPACE_URI, "starttime"); | 232 ArtifactNamespaceContext.NAMESPACE_URI, "starttime"); |
233 String mstoptime = stationele.getAttributeNS( | 233 String mstoptime = stationele.getAttributeNS( |
234 ArtifactNamespaceContext.NAMESPACE_URI, "stoptime"); | 234 ArtifactNamespaceContext.NAMESPACE_URI, "stoptime"); |
235 | 235 |
236 String gaugename = null; | |
237 | |
238 Element gaugeele = (Element)stationele.getFirstChild(); | |
239 if (gaugeele != null) { | |
240 gaugename = gaugeele.getAttributeNS( | |
241 ArtifactNamespaceContext.NAMESPACE_URI, "name"); | |
242 } | |
243 | |
244 | |
236 logger.debug("Found measurement station with name " + mname); | 245 logger.debug("Found measurement station with name " + mname); |
237 | 246 |
238 MeasurementStation station = new DefaultMeasurementStation( | 247 MeasurementStation station = new DefaultMeasurementStation( |
239 rivername, | 248 rivername, |
240 mname, | 249 mname, |
245 kmup, | 254 kmup, |
246 riverside, | 255 riverside, |
247 mtype, | 256 mtype, |
248 moperator, | 257 moperator, |
249 parseDate(mstarttime), | 258 parseDate(mstarttime), |
250 parseDate(mstoptime) | 259 parseDate(mstoptime), |
260 gaugename | |
251 ); | 261 ); |
252 | 262 |
253 mstations.add(station); | 263 mstations.add(station); |
254 } | 264 } |
255 } | 265 } |