changeset 954:a5ea28339e5b

Set the extent of created WMSLayerFacets. flys-artifacts/trunk@2372 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 20 Jul 2011 12:42:06 +0000
parents 6f8873fca927
children 30f48f5ccdc3
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 7 files changed, 43 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jul 20 12:42:06 2011 +0000
@@ -1,3 +1,15 @@
+2011-07-20  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java,
+	  src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java:
+	  Set the extent of the created WMSLayerFacets and i18n its descriptions.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added I18N strings for the
+	  background an river axis layer.
+
 2011-07-20  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java	Wed Jul 20 12:42:06 2011 +0000
@@ -10,11 +10,15 @@
 
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.WMSLayerFacet;
+import de.intevation.flys.artifacts.resources.Resources;
 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
 
 
 public class RiverAxisState extends OutputState {
 
+    public static final String I18N_DESCRIPTION = "floodmap.riveraxis";
+
+
     private static final Logger logger = Logger.getLogger(RiverAxisState.class);
 
     @Override
@@ -26,16 +30,20 @@
     ) {
         logger.debug("RiverAxisState.computeInit()");
 
+        // TODO Add config for background layer
         WMSLayerFacet facet = new WMSLayerFacet(
             0,
             FLOODMAP_RIVERAXIS,
-            "RIVER AXIS",
+            Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION),
             ComputeType.INIT,
             getID(), hash,
-            "http://localhost/wms/"); // TODO add correct WMS URL
+            "http://denmark.atlas/cgi-bin/flys-wms"); // TODO add correct WMS URL
 
         facet.addLayer("riveraxis");
 
+        // TODO determine extent based on the given geometry
+        facet.setExtent("6.5 49.1 7.0 49.7");
+
         facets.add(facet);
 
         return null;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java	Wed Jul 20 12:42:06 2011 +0000
@@ -10,11 +10,15 @@
 
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.WMSLayerFacet;
+import de.intevation.flys.artifacts.resources.Resources;
 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
 
 
 public class WMSBackgroundState extends OutputState {
 
+    public static final String I18N_DESCRIPTION = "floodmap.wmsbackground";
+
+
     private static final Logger logger = Logger.getLogger(WMSBackgroundState.class);
 
     @Override
@@ -26,16 +30,20 @@
     ) {
         logger.debug("WMSBackgroundState.computeInit()");
 
+        // TODO Add config for background layer
         WMSLayerFacet facet = new WMSLayerFacet(
             0,
             FLOODMAP_WMSBACKGROUND,
-            "WMS-BACKGROUND",
+            Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION),
             ComputeType.INIT,
             getID(), hash,
             "http://vmap0.tiles.osgeo.org/wms/vmap0");
 
         facet.addLayer("basic");
 
+        // TODO determine extent based on the given geometry
+        facet.setExtent("-45 -90 45 90");
+
         facets.add(facet);
 
         return null;
--- a/flys-artifacts/src/main/resources/messages.properties	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Wed Jul 20 12:42:06 2011 +0000
@@ -60,3 +60,6 @@
 export.discharge.longitudinal.section.csv.header.w = W [NN + m]
 export.discharge.longitudinal.section.csv.header.cw = W corr.
 export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s]
+
+floodmap.wmsbackground = Background Map
+floodmap.riveraxis = River Axis
--- a/flys-artifacts/src/main/resources/messages_de.properties	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Wed Jul 20 12:42:06 2011 +0000
@@ -60,3 +60,6 @@
 export.discharge.longitudinal.section.csv.header.w = W [NN + m]
 export.discharge.longitudinal.section.csv.header.cw = W korr.
 export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s]
+
+floodmap.wmsbackground = Hintergrundkarte
+floodmap.riveraxis = Flussachse
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Wed Jul 20 12:42:06 2011 +0000
@@ -60,3 +60,6 @@
 export.discharge.longitudinal.section.csv.header.w = W [NN + m]
 export.discharge.longitudinal.section.csv.header.cw = W korr.
 export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s]
+
+floodmap.wmsbackground = Hintergrundkarte
+floodmap.riveraxis = Flussachse
--- a/flys-artifacts/src/main/resources/messages_en.properties	Wed Jul 20 12:37:54 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Wed Jul 20 12:42:06 2011 +0000
@@ -60,3 +60,6 @@
 export.discharge.longitudinal.section.csv.header.w = W [NN + m]
 export.discharge.longitudinal.section.csv.header.cw = W corr.
 export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s]
+
+floodmap.wmsbackground = Background Map
+floodmap.riveraxis = River Axis

http://dive4elements.wald.intevation.org