changeset 6930:750ce031e8e0

DischargeLongitudinalSectionGenerator: Use QOutProcessor, fix compilation.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 27 Aug 2013 16:16:13 +0200
parents 35ecfd1a861a
children 2c8e5bad8699
files artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java
diffstat 1 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java	Tue Aug 27 16:15:45 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java	Tue Aug 27 16:16:13 2013 +0200
@@ -19,6 +19,7 @@
 import org.dive4elements.river.artifacts.model.WQCKms;
 import org.dive4elements.river.artifacts.model.WQKms;
 import org.dive4elements.river.exports.process.Processor;
+import org.dive4elements.river.exports.process.QOutProcessor;
 import org.dive4elements.river.exports.process.WOutProcessor;
 
 import org.dive4elements.river.jfree.RiverAnnotation;
@@ -61,14 +62,7 @@
 
         Facet facet = artifactFacet.getFacet();
 
-        if (name.contains(DISCHARGE_LONGITUDINAL_Q)) {
-            doQOut(
-                (WQKms) artifactFacet.getData(context),
-                artifactFacet,
-                attr,
-                visible);
-        }
-        else if (name.equals(DISCHARGE_LONGITUDINAL_C)) {
+        if (name.equals(DISCHARGE_LONGITUDINAL_C)) {
             doCorrectedWOut(
                 (WQCKms) artifactFacet.getData(context),
                 facet,
@@ -84,18 +78,15 @@
                 artifactFacet,
                 attr, visible, YAXIS.W.idx);
         }
-        else if (name.equals(STATIC_WQKMS_Q)) {
-            doQOut(
-                (WQKms) artifactFacet.getData(context),
-                artifactFacet,
-                attr,
-                visible);
-        }
         else {
             Processor processor = new WOutProcessor();
+            Processor qProcessor = new QOutProcessor();
             if (processor.canHandle(name)) {
                 processor.doOut(this, artifactFacet, attr, visible, YAXIS.W.idx);
             }
+            else if (qProcessor.canHandle(name)) {
+                qProcessor.doOut(this, artifactFacet, attr, visible, YAXIS.Q.idx);
+            }
             else {
                 logger.warn("Unknown facet name: " + name);
             }

http://dive4elements.wald.intevation.org