changeset 970:d91ffd0e8239

Some small xpath changes for wms output regarding rev1134 (issue198). gnv/trunk@1135 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 27 May 2010 16:51:52 +0000
parents 3e6e07142a48
children a0e6566cd111
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/WMSAction.java
diffstat 2 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Thu May 27 09:48:32 2010 +0000
+++ b/gnv/ChangeLog	Thu May 27 16:51:52 2010 +0000
@@ -1,3 +1,15 @@
+2010-05-27  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue198
+
+	* src/main/java/de/intevation/gnv/action/WMSAction.java: Changed the XPath
+	  of the layer name and the time to live. Rev1134 introduced a title for wms
+	  layers - the title has been used before to specify a wms layer. The time
+	  to live moved from layer node to abstract meta information.
+
+	  NOTE: Just the first layer of a wms request is visible in the OL
+	  application currently, because there is no group-layer anymore.
+
 2010-05-27  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* src/main/webapp/WEB-INF/jsp/includes/display_wms_options_inc.jsp: Make use
--- a/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java	Thu May 27 09:48:32 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java	Thu May 27 16:51:52 2010 +0000
@@ -53,8 +53,11 @@
     public static final String XPATH_LAYER_TITLE =
         "/art:meta/art:layer/art:title/text()";
 
-    public static final String XPATH_LAYER_TTL =
-        "/art:meta/art:layer/art:ttl/text()";
+    public static final String XPATH_LAYER_NAME =
+        "/art:meta/art:layer/art:name/text()";
+
+    public static final String XPATH_TTL =
+        "/art:meta/art:mapserver/art:ttl/text()";
 
     /**
      * the logger, used to log exceptions and additonaly information
@@ -124,9 +127,9 @@
             String mapfilePath   = XMLUtils.getStringXPath(
                 meta, XPATH_MAPSERVER_MAPFILE);
             String layer         = XMLUtils.getStringXPath(
-                meta, XPATH_LAYER_TITLE);
+                meta, XPATH_LAYER_NAME);
             String tmpTTL        = XMLUtils.getStringXPath(
-                meta, XPATH_LAYER_TTL);
+                meta, XPATH_TTL);
             layer                = layer != null ? layer : artifact.getId();
 
             String ttl = null;
@@ -151,7 +154,7 @@
             if (logger.isDebugEnabled()) {
                 logger.debug("Mapserver path: " + mapserverPath);
                 logger.debug("Mapfile path: " + mapfilePath);
-                logger.debug("Layer title: " + layer);
+                logger.debug("Layer: " + layer);
                 logger.debug("Layer ttl: " + ttl);
             }
 
@@ -166,7 +169,7 @@
                 request.setAttribute("wms_published", Boolean.TRUE);
                 return super.execute(mapping, form, request, response);
             }else{
-                return super.getExceptionForward(mapping);
+                return super.execute(mapping, form, request, response);
             }
         }
         catch (Exception e) {

http://dive4elements.wald.intevation.org