[Dive4elements-commits] [PATCH 3 of 5] Extract the gauge name from the riverservice response
Wald Commits
scm-commit at wald.intevation.org
Tue Oct 30 13:05:42 CET 2012
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351598600 -3600
# Node ID 87362ba26c7245df253b6639a10e9008f1f36736
# Parent 7320830987a398cc8fecd999523993535bb9cfa9
Extract the gauge name from the riverservice response
diff -r 7320830987a3 -r 87362ba26c72 flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java
--- 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);
More information about the Dive4elements-commits
mailing list