[PATCH 2 of 2] DischargeLongitudinalSectionGenerator: Use QOutProcessor, fix compilation
Wald Commits
scm-commit at wald.intevation.org
Tue Aug 27 16:05:57 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1377612973 -7200
# Node ID 750ce031e8e01ff3c87c92f84d0b836ea15d189d
# Parent 35ecfd1a861a70c9cae320ac4dcb5f3301122ac1
DischargeLongitudinalSectionGenerator: Use QOutProcessor, fix compilation.
diff -r 35ecfd1a861a -r 750ce031e8e0 artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java
--- 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);
}
More information about the Dive4elements-commits
mailing list