diff flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java @ 3847:f3b821735e39

Calculate the info url via i18n Don't fetch the info url from the artifact service and use i18n to calculate the url by using the official gauge and river number. flys-client/trunk@5582 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Mon, 24 Sep 2012 08:39:22 +0000
parents 8e169e4e1b57
children c434dd2e84cf
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java	Sat Sep 22 22:26:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java	Mon Sep 24 08:39:22 2012 +0000
@@ -81,8 +81,8 @@
                     ArtifactNamespaceContext.NAMESPACE_URI, "minq");
             String rmaxq = riverresp.getAttributeNS(
                     ArtifactNamespaceContext.NAMESPACE_URI, "maxq");
-            String rinfourl = riverresp.getAttributeNS(
-                    ArtifactNamespaceContext.NAMESPACE_URI, "info-url");
+            String rofficial = riverresp.getAttributeNS(
+                    ArtifactNamespaceContext.NAMESPACE_URI, "official");
 
             logger.debug("River is " + rname);
 
@@ -127,9 +127,7 @@
                             ArtifactNamespaceContext.NAMESPACE_URI, "maxw");
                     String gstation = gaugeele.getAttributeNS(
                             ArtifactNamespaceContext.NAMESPACE_URI, "station");
-                    String ginfourl = riverresp.getAttributeNS(
-                            ArtifactNamespaceContext.NAMESPACE_URI, "info-url");
-                    String gofficial = riverresp.getAttributeNS(
+                    String gofficial = gaugeele.getAttributeNS(
                             ArtifactNamespaceContext.NAMESPACE_URI, "official");
 
                     logger.debug("Found gauge with name " + gname);
@@ -147,7 +145,6 @@
                             parseDouble(gminw),
                             parseDouble(gmaxw),
                             rwstunit,
-                            ginfourl,
                             parseLong(gofficial)
                             );
 
@@ -163,7 +160,7 @@
                     rwstunit,
                     parseDouble(rminq),
                     parseDouble(rmaxq),
-                    rinfourl,
+                    parseLong(rofficial),
                     gauges);
 
             logger.debug("Finished RiverInfoService.");

http://dive4elements.wald.intevation.org