changeset 3810:b6431052a694

Picked rev3354 from trunk. flys-artifacts/tags/pre2.6-2011-12-05@3355 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 05 Dec 2011 10:51:15 +0000 (2011-12-05)
parents cc83b8e42dbe
children 1558ef7b0e7b
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java
diffstat 3 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Dec 05 09:48:44 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Dec 05 10:51:15 2011 +0000
@@ -1,3 +1,12 @@
+2011-12-05  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/utils/MapfileGenerator.java: Modified
+	  prefix constants for Mapserver layers and renamed constants (which have
+	  been postfixes before).
+
+	* src/main/java/de/intevation/flys/wsplgen/FacetCreator.java: Adjusted
+	  usage of Mapserver constants to the changes described above.
+
 2011-12-05  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Mon Dec 05 09:48:44 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Mon Dec 05 10:51:15 2011 +0000
@@ -41,11 +41,11 @@
     public static final String SHP_LAYER_TEMPLATE = "shapefile_layer.vm";
     public static final String DB_LAYER_TEMPLATE  = "db_layer.vm";
 
-    public static final String MS_WSPLGEN_POSTFIX  = "-wsplgen";
-    public static final String MS_BARRIERS_POSTFIX = "-barriers";
-    public static final String MS_LINE_POSTFIX     = "-lines";
-    public static final String MS_POLYGONS_POSTFIX = "-polygons";
-    public static final String MS_LAYER_PREFIX     = "ms_layer-";
+    public static final String MS_WSPLGEN_PREFIX  = "wsplgen-";
+    public static final String MS_BARRIERS_PREFIX = "barriers-";
+    public static final String MS_LINE_PREFIX     = "lines-";
+    public static final String MS_POLYGONS_PREFIX = "polygons-";
+    public static final String MS_LAYER_PREFIX    = "ms_layer-";
 
     protected static final long SLEEPTIME = 10 * 1000L; // 10 seconds
 
@@ -370,7 +370,7 @@
         logger.debug("createUeskLayer");
 
         LayerInfo layerinfo = new LayerInfo();
-        layerinfo.setName(MS_WSPLGEN_POSTFIX + flys.identifier());
+        layerinfo.setName(MS_WSPLGEN_PREFIX + flys.identifier());
         layerinfo.setType("POLYGON");
         layerinfo.setDirectory(flys.identifier());
         layerinfo.setData(WSPLGEN_RESULT_SHAPE);
@@ -422,7 +422,7 @@
     throws FileNotFoundException, IOException
     {
         String uuid       = flys.identifier();
-        String group      = uuid + MS_BARRIERS_POSTFIX;
+        String group      = MS_BARRIERS_PREFIX + uuid;
         String groupTitle = "I18N_BARRIERS_TITLE";
 
         File dir  = new File(getShapefileBaseDir(), uuid);
@@ -434,7 +434,7 @@
         }
 
         LayerInfo lineInfo = new LayerInfo();
-        lineInfo.setName(MS_LINE_POSTFIX + uuid);
+        lineInfo.setName(MS_LINE_PREFIX + uuid);
         lineInfo.setType("LINE");
         lineInfo.setDirectory(uuid);
         lineInfo.setData(WSPLGEN_LINES_SHAPE);
@@ -467,7 +467,7 @@
     throws FileNotFoundException, IOException
     {
         String uuid       = flys.identifier();
-        String group      = uuid + MS_BARRIERS_POSTFIX;
+        String group      = uuid + MS_BARRIERS_PREFIX;
         String groupTitle = "I18N_BARRIERS_TITLE";
 
         File dir  = new File(getShapefileBaseDir(), uuid);
@@ -479,7 +479,7 @@
         }
 
         LayerInfo polygonInfo = new LayerInfo();
-        polygonInfo.setName(MS_POLYGONS_POSTFIX + uuid);
+        polygonInfo.setName(MS_POLYGONS_PREFIX + uuid);
         polygonInfo.setType("POLYGON");
         polygonInfo.setDirectory(uuid);
         polygonInfo.setData(WSPLGEN_POLYGONS_SHAPE);
--- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Mon Dec 05 09:48:44 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Mon Dec 05 10:51:15 2011 +0000
@@ -116,7 +116,7 @@
         }
 
         wsplgen.addLayer(
-            MapfileGenerator.MS_WSPLGEN_POSTFIX + artifact.identifier());
+            MapfileGenerator.MS_WSPLGEN_PREFIX + artifact.identifier());
         wsplgen.setSrid(getSrid());
         wsplgen.setExtent(bounds);
 
@@ -137,7 +137,7 @@
             getUrl());
 
         barriers.addLayer(
-            MapfileGenerator.MS_BARRIERS_POSTFIX + artifact.identifier());
+            MapfileGenerator.MS_BARRIERS_PREFIX + artifact.identifier());
         barriers.setSrid(getSrid());
         barriers.setExtent(getBounds());
 

http://dive4elements.wald.intevation.org