changeset 6215:0f5cacdd60a9

I999: Epochs and single years are handled in the same way in difference calc.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 06 Jun 2013 13:28:05 +0200
parents 467df391317d
children 9fdb2b59b992
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Thu Jun 06 13:26:34 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Thu Jun 06 13:28:05 2013 +0200
@@ -60,16 +60,16 @@
 
     private CalculationResult internalCalculate() {
 
-        if (yearEpoch.equals("year")) {
-            BedDiffYearResult [] results = new BedDiffYearResult[heightIds.length];
+        BedDiffYearResult [] results = new BedDiffYearResult[heightIds.length];
 
-            for (int i = 0; i < heightIds.length; i++) {
-                BedHeight [] pair = getHeightPair(heightIds[i], "single");
-                results[i] = calculateYearDifference(pair);
-            }
-            return new CalculationResult(results, this);
+        for (int i = 0; i < heightIds.length; i++) {
+            BedHeight [] pair = getHeightPair(heightIds[i], "single");
+            results[i] = calculateYearDifference(pair);
         }
-
+        return new CalculationResult(results, this);
+        // Currently epochs are handled like single years. To handle epochs
+        // uncomment the follwing code and use an if-clause in the code above.
+/*
         if (yearEpoch.equals("epoch")) {
             BedDiffEpochResult [] results = new BedDiffEpochResult[heightIds.length];
 
@@ -81,6 +81,7 @@
         }
 
        return new CalculationResult();
+       */
     }
 
     private static BedHeight [] getHeightPair(int [] ids, String type) {

http://dive4elements.wald.intevation.org