diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/RangeAccess.java @ 4825:f8217f1fef2e

ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess. Inherit from RangeAccess, adjusted constructor and callers.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 21 Jan 2013 17:11:10 +0100
parents d5d2faf14522
children 15e55fdbb402
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/RangeAccess.java	Mon Jan 21 17:00:16 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/RangeAccess.java	Mon Jan 21 17:11:10 2013 +0100
@@ -19,6 +19,8 @@
 
     Double to;
 
+    Double step;
+
 
     public RangeAccess(FLYSArtifact artifact, CallContext context) {
         super(artifact);
@@ -45,6 +47,21 @@
     }
 
 
+    /** Step width for calculation. */
+    public Double getStep() {
+
+        if (step == null) {
+            step = getDouble("ld_step");
+        }
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("step: '" + step + "'");
+        }
+
+        return step;
+    }
+
+
     /**
      * Get min and max kilometer, independent of parametization
      * (ld_from/to vs ld_locations).

http://dive4elements.wald.intevation.org