Mercurial > dive4elements > river
changeset 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 | 7320830987a3 |
children | 7b701d9dca98 |
files | flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java Tue Oct 30 13:02:45 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java Tue Oct 30 13:03:20 2012 +0100 @@ -233,6 +233,15 @@ String mstoptime = stationele.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "stoptime"); + String gaugename = null; + + Element gaugeele = (Element)stationele.getFirstChild(); + if (gaugeele != null) { + gaugename = gaugeele.getAttributeNS( + ArtifactNamespaceContext.NAMESPACE_URI, "name"); + } + + logger.debug("Found measurement station with name " + mname); MeasurementStation station = new DefaultMeasurementStation( @@ -247,7 +256,8 @@ mtype, moperator, parseDate(mstarttime), - parseDate(mstoptime) + parseDate(mstoptime), + gaugename ); mstations.add(station);