changeset 1062:ee105e5d5ead

Repaired broken river wms initialization. flys-artifacts/trunk@2537 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 23 Aug 2011 15:32:33 +0000 (2011-08-23)
parents b1b0a0b61845
children e7c1ebfc2701
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Aug 23 13:17:21 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Aug 23 15:32:33 2011 +0000
@@ -1,3 +1,8 @@
+2011-08-23  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java:
+	  Repaired broken river-wms initialization.
+
 2011-08-23  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java	Tue Aug 23 13:17:21 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java	Tue Aug 23 15:32:33 2011 +0000
@@ -74,7 +74,7 @@
         "/themes/mappings/mapping";
 
     public static final String XPATH_RIVER_WMS =
-        "/artifact-database/floodmap/river-wms";
+        "/artifact-database/floodmap/river";
 
     /**
      * Creates a new FLYSArtifactContext object and initialize all
@@ -377,8 +377,8 @@
         for (int i = 0; i < num; i++) {
             Element e = (Element) rivers.item(i);
 
-            String river = e.getAttribute("river");
-            String url   = e.getAttribute("url");
+            String river = e.getAttribute("name");
+            String url   = XMLUtils.xpathString(e, "river-wms/@url", null);
 
             if (river != null && url != null) {
                 riverWMS.put(river, url);

http://dive4elements.wald.intevation.org