changeset 6901:a3bf140ce739

ComputedDischargeCurveGenerator: Use DischargeProcessor to add main values.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 22 Aug 2013 14:27:42 +0200
parents a38640f273ae
children 143063f07405
files artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java
diffstat 1 files changed, 6 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Thu Aug 22 14:26:04 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Thu Aug 22 14:27:42 2013 +0200
@@ -16,6 +16,7 @@
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WKms;
 import org.dive4elements.river.artifacts.model.WQKms;
+import org.dive4elements.river.exports.process.DischargeProcessor;
 import org.dive4elements.river.jfree.RiverAnnotation;
 import org.dive4elements.river.jfree.StickyAxisAnnotation;
 import org.dive4elements.river.jfree.StyledXYSeries;
@@ -152,9 +153,11 @@
             return;
         }
 
-        //XXX DEAD CODE // Facet facet = artifactFacet.getFacet();
-
-        if (name.equals(COMPUTED_DISCHARGE_Q)) {
+        DischargeProcessor dProcessor = new DischargeProcessor(getRange()[0]);
+        if (dProcessor.canHandle(name)) {
+            dProcessor.doOut(this, artifactFacet, attr, visible, YAXIS.W.idx);
+        }
+        else if (name.equals(COMPUTED_DISCHARGE_Q)) {
             doDischargeQOut((WQKms) artifactFacet.getData(context), artifactFacet, attr, visible);
         }
         else if (name.equals(STATIC_WQ)) {
@@ -167,17 +170,6 @@
                 attr,
                 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, attr, visible);
-        }
         else if (STATIC_WKMS_INTERPOL.equals(name) ||
             HEIGHTMARKS_POINTS.equals(name) ||
             STATIC_WQKMS_W.equals(name)) {

http://dive4elements.wald.intevation.org