diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 689:f8ac04b2dbd0 facets-slt

Added two more compute() methods to ComputeCallback to distinguish between different phases of the artifact. flys-artifacts/branches/facets-slt@2129 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 16 Jun 2011 08:43:58 +0000
parents 06689035024c
children af393c5eb2c8
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Thu Jun 16 08:25:06 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Thu Jun 16 08:43:58 2011 +0000
@@ -23,7 +23,6 @@
 import de.intevation.flys.model.Gauge;
 import de.intevation.flys.model.River;
 
-import de.intevation.flys.artifacts.states.CalculationSelect;
 import de.intevation.flys.artifacts.states.DefaultState;
 import de.intevation.flys.artifacts.context.FLYSContext;
 
@@ -246,45 +245,6 @@
 
 
     /**
-     * Dispatches the computation request to compute(CallContext context, String
-     * hash) with the current hash value of the artifact which is provided by
-     * hash().
-     *
-     * @param context The CallContext.
-     */
-    public Object compute(CallContext context) {
-        return compute(context, hash());
-    }
-
-
-    /**
-     * Dispatches computation requests to the current state which needs to
-     * implement a createComputeCallback(String hash, FLYSArtifact artifact)
-     * method.
-     *
-     * @param context The CallContext.
-     * @param hash The hash value which is used to fetch computed data from
-     * cache.
-     *
-     * @return the computed data.
-     */
-    public Object compute(CallContext context, String hash) {
-        String calc = (String) getData(CalculationSelect.FIELD_MODE).getValue();
-
-        DefaultState current = (DefaultState) getCurrentState(context);
-
-        ComputeCallback callback = current.createComputeCallback(hash(), this);
-
-        if (callback == null) {
-            logger.info("There is no data which needs to be computed.");
-            return null;
-        }
-
-        return compute(hash, callback);
-    }
-
-
-    /**
      * Returns the data that is computed by a waterlevel computation.
      *
      * @return an array of data triples that consist of W, Q and Kms.

http://dive4elements.wald.intevation.org