[PATCH 3 of 5] DischargeCurveGenerator: Use DischargeProcessor

Wald Commits scm-commit at wald.intevation.org
Thu Aug 22 14:23:45 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1377174284 -7200
# Node ID 0a127b6fa4901f6dac0115a626f04291fc45b325
# Parent  ebe7dfffacc4cd13ccbea10c5e4521f0c2a07e3f
DischargeCurveGenerator: Use DischargeProcessor.

diff -r ebe7dfffacc4 -r 0a127b6fa490 artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Thu Aug 22 14:24:13 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Thu Aug 22 14:24:44 2013 +0200
@@ -191,7 +191,12 @@
         String name = artifactFacet.getFacetName();
         logger.debug("DischargeCurveGenerator.doOut: " + name);
 
-        if (name.equals(DISCHARGE_CURVE)
+        DischargeProcessor dProcessor = new DischargeProcessor(getRange()[0]);
+        if (dProcessor.canHandle(name)) {
+            // In Base DischargeCurveGenerator, always at gauge, use WCm axis.
+            dProcessor.doOut(this, artifactFacet, theme, visible, YAXIS.WCm.idx);
+        }
+        else if (name.equals(DISCHARGE_CURVE)
                 || name.equals(GAUGE_DISCHARGE_CURVE)) {
             doDischargeOut(
                 (D4EArtifact)artifactFacet.getArtifact(),
@@ -200,17 +205,6 @@
                 theme,
                 visible);
         }
-        else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q)
-                || name.equals(MAINVALUES_Q)
-                || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W)
-                || name.equals(MAINVALUES_W))
-        {
-            RiverAnnotation mainValues = (RiverAnnotation) artifactFacet.getData(context);
-            translateRiverAnnotation(mainValues);
-            doAnnotations(
-                mainValues,
-                artifactFacet, theme, visible);
-        }
         else if (FacetTypes.IS.MANUALPOINTS(name)) {
             doPoints(artifactFacet.getData(context),
                 artifactFacet,


More information about the Dive4elements-commits mailing list