changeset 4860:ba4d7f153890

FacetCreator: Updated to use RangeAccess instead of FLYSUtils.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 Jan 2013 13:04:54 +0100
parents e31231d0a720
children aae2b7492c1e
files flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Wed Jan 23 13:04:16 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Wed Jan 23 13:04:54 2013 +0100
@@ -9,6 +9,7 @@
 
 import de.intevation.artifactdatabase.state.Facet;
 import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.access.RangeAccess;
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.FacetTypes;
 import de.intevation.flys.artifacts.model.map.WMSLayerFacet;
@@ -60,6 +61,7 @@
         this.stateId    = sId;
     }
 
+    // TODO We have FLYSUtils and will have RiverAccess to do this
     protected String getRiver() {
         return artifact.getDataAsString("river");
     }
@@ -74,7 +76,8 @@
 
     protected Envelope getWSPLGENBounds() {
         String river = getRiver();
-        double kms[] = FLYSUtils.getKmRange(artifact);
+        RangeAccess rangeAccess = new RangeAccess(artifact, null);
+        double kms[] = rangeAccess.getKmRange();
 
         logger.debug("### getWSPLGENBounds");
         logger.debug("###    from km: " + kms[0]);
@@ -111,7 +114,8 @@
 
     public void createWSPLGENFacet() {
         String river = getRiver();
-        double kms[] = FLYSUtils.getKmRange(artifact);
+        RangeAccess rangeAccess = new RangeAccess(artifact, null);
+        double kms[] = rangeAccess.getKmRange();
 
         WSPLGENLayerFacet wsplgen = new WSPLGENLayerFacet(
             0,

http://dive4elements.wald.intevation.org