changeset 7102:13a842224694 generator-refactoring

Add WDiffProcessor
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 23 Sep 2013 15:46:05 +0200
parents d07a8a36c4d4
children 5009b151f146
files artifacts/doc/conf/generators.xml artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java
diffstat 2 files changed, 31 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/generators.xml	Mon Sep 23 15:30:46 2013 +0200
+++ b/artifacts/doc/conf/generators.xml	Mon Sep 23 15:46:05 2013 +0200
@@ -6,7 +6,7 @@
     <output-generator names="cross_section_chartinfo" class="org.dive4elements.river.exports.CrossSectionInfoGenerator"/>
     <output-generator names="computed_discharge_curve" class="org.dive4elements.river.exports.ComputedDischargeCurveGenerator"/>
     <output-generator names="computed_discharge_curve_chartinfo" class="org.dive4elements.river.exports.ComputedDischargeCurveInfoGenerator"/>
-    <output-generator names="longitudinal_section,longitudinal_section_chartinfo" class="org.dive4elements.river.exports.DiagramGenerator" converter="org.dive4elements.river.exports.DiagramAttributes">
+    <output-generator names="longitudinal_section,longitudinal_section_chartinfo" class="org.dive4elements.river.exports.LongitudinalSectionGenerator" converter="org.dive4elements.river.exports.DiagramAttributes">
         <axis name="W"/>
         <axis name="D"/>
         <axis name="Q"/>
@@ -22,12 +22,15 @@
         </domain-axis>
         <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
         <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
+        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
         <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
         <processor class="org.dive4elements.river.exports.process.BedheightProcessor" axis="W"/>
         <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
         <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="W"/>
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <!-- TODO: Area / W_DIFF -->
+        <!-- The area processor decides based on the facet name which axis to choose.
+             You have to ensure that there is a W and Q axis accordingly -->
+        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
     </output-generator>
     <output-generator names="duration_curve" class="org.dive4elements.river.exports.DurationCurveGenerator"/>
     <output-generator names="duration_curve_chartinfo" class="org.dive4elements.river.exports.DurationCurveInfoGenerator"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java	Mon Sep 23 15:46:05 2013 +0200
@@ -0,0 +1,26 @@
+/* Copyright (C) 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.exports.process;
+
+import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
+import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.model.WKms;
+import org.dive4elements.river.themes.ThemeDocument;
+
+public class WDiffProcessor extends WOutProcessor {
+
+    @Override
+    public boolean canHandle(String facetType) {
+        if (facetType == null) {
+            return false;
+        }
+        return facetType.equals(FacetTypes.W_DIFFERENCES);
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org