changeset 1111:19182eaccc8d

Added a prefix for WMS layers to prevent the mapserver from generating invalid xml that would end in a bug (issue314, issue315). gnv-artifacts/trunk@1245 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 29 Jun 2010 16:35:36 +0000
parents c6b2437c0c13
children 9a24c743efa6
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Jun 29 09:58:44 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Jun 29 16:35:36 2010 +0000
@@ -1,3 +1,15 @@
+2010-06-29  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue315, Issue314
+
+	* src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java,
+	  src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java: All
+	  generated wms layers will now have a prefix 'GNV_'. On this way, we can
+	  ensure that the name of wms layers never start with a digit. This is
+	  necessary to prevent the mapserver from generating invalid xml while
+	  creating a GetFeatureInfo response (mapserver generates xml elements from
+	  layer names - xml nodes may not start with a digit!).
+
 2010-06-29  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue318
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java	Tue Jun 29 09:58:44 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java	Tue Jun 29 16:35:36 2010 +0000
@@ -707,12 +707,12 @@
 
 
     protected String getLayerName(String uuid, int idx) {
-        return uuid + "_" + idx;
+        return "GNV_" + uuid + "_" + idx;
     }
 
 
     protected String getLayerTitle(String prefix, String base) {
-        return prefix + "_" + base;
+        return "GNV_" + prefix + "_" + base;
     }
 
 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Tue Jun 29 09:58:44 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Tue Jun 29 16:35:36 2010 +0000
@@ -445,7 +445,7 @@
      * @return the name of the layer.
      */
     protected String getLayerName(String uuid, String type) {
-        return uuid + "-" + type;
+        return "GNV_" + uuid + "-" + type;
     }
 
     /**
@@ -456,7 +456,7 @@
      * @return the title of the layer.
      */
     protected String getLayerTitle(String prefix, String type) {
-        return "" + prefix + "-" + type;
+        return "GNV_" + prefix + "-" + type;
     }
 
 

http://dive4elements.wald.intevation.org