[Dive4elements-commits] [PATCH 07 of 13] Removed indentation and added doc for prepare*Data

Wald Commits scm-commit at wald.intevation.org
Thu Jun 27 10:40:16 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372322577 -7200
# Node ID cf514239d290bab60bac1155e9b35d617ef41728
# Parent  126c76184c3e2a3188cb080f69bef5341b15b471
Removed indentation and added doc for prepare*Data.

diff -r 126c76184c3e -r cf514239d290 artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:41:36 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:42:57 2013 +0200
@@ -21,6 +21,7 @@
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DateRange;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.extreme.Curve;
@@ -31,6 +32,7 @@
 import org.dive4elements.river.jfree.JFreeUtil;
 import org.dive4elements.river.jfree.StyledXYSeries;
 
+import org.dive4elements.river.utils.RiverUtils;
 import org.dive4elements.river.utils.ThemeUtil;
 
 
@@ -71,21 +73,23 @@
             "W [NN + m]";
 
 
+    /** First, ask parent to add data, then handle extreme_wq_curve(_base) data.*/
     @Override
     public boolean prepareChartData(ArtifactAndFacet aaf, Document theme, boolean visible) {
-        if (!super.prepareChartData(aaf, theme, visible)) {
-            String name = aaf.getFacetName();
-            if (name.equals(EXTREME_WQ_CURVE)) {
-                doExtremeCurveOut(aaf, theme, visible);
-                return true;
-            }
-            else if (name.equals(EXTREME_WQ_CURVE_BASE)) {
-                doExtremeCurveBaseOut(aaf, theme, visible);
-                return true;
-            }
-            return false;
+        if (super.prepareChartData(aaf, theme, visible)) {
+            return true;
         }
-        return true;
+
+        String name = aaf.getFacetName();
+        if (name.equals(EXTREME_WQ_CURVE)) {
+            doExtremeCurveOut(aaf, theme, visible);
+            return true;
+        }
+        else if (name.equals(EXTREME_WQ_CURVE_BASE)) {
+            doExtremeCurveBaseOut(aaf, theme, visible);
+            return true;
+        }
+        return false;
     }
 
     /** Do Extreme Curve nonextrapolated points out. */


More information about the Dive4elements-commits mailing list