diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/ExtremeAccess.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 2d3f8af87b7b
children
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/ExtremeAccess.java	Mon Jan 21 17:00:16 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/ExtremeAccess.java	Mon Jan 21 17:11:10 2013 +0100
@@ -1,5 +1,7 @@
 package de.intevation.flys.artifacts.access;
 
+import de.intevation.artifacts.CallContext;
+
 import de.intevation.flys.artifacts.FLYSArtifact;
 
 import de.intevation.flys.artifacts.model.RangeWithValues;
@@ -13,15 +15,11 @@
 
 /** Access data used for extreme value analysis. */
 public class ExtremeAccess
-extends      RiverAccess
+extends      RangeAccess
 {
     /** Our private logger. */
     private static Logger logger = Logger.getLogger(ExtremeAccess.class);
 
-    protected Double from;
-    protected Double to;
-    protected Double step;
-
     protected Long start;
     protected Long end;
 
@@ -32,57 +30,8 @@
     protected List<RangeWithValues> ranges;
 
 
-    public ExtremeAccess() {
-    }
-
-
-    public ExtremeAccess(FLYSArtifact artifact) {
-        super(artifact);
-    }
-
-
-    /** From (km) for calculation. */
-    public Double getFrom() {
-
-        if (from == null) {
-            from = getDouble("ld_from");
-        }
-
-        if (logger.isDebugEnabled()) {
-            logger.debug("from: '" + from + "'");
-        }
-
-        return from;
-    }
-
-
-    /** To (km) for calculation. */
-    public Double getTo() {
-
-        if (to == null) {
-            to = getDouble("ld_to");
-        }
-
-        if (logger.isDebugEnabled()) {
-            logger.debug("to: '" + to + "'");
-        }
-
-        return to;
-    }
-
-
-    /** Step width for calculation. */
-    public Double getStep() {
-
-        if (step == null) {
-            step = getDouble("ld_step");
-        }
-
-        if (logger.isDebugEnabled()) {
-            logger.debug("step: '" + step + "'");
-        }
-
-        return step;
+    public ExtremeAccess(FLYSArtifact artifact, CallContext context) {
+        super(artifact, context);
     }
 
 

http://dive4elements.wald.intevation.org