[PATCH 2 of 5] Add WDiffProcessor
Wald Commits
scm-commit at wald.intevation.org
Mon Sep 23 16:43:51 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1379943965 -7200
# Branch generator-refactoring
# Node ID 13a842224694cdc563be248b47191c296a58780b
# Parent d07a8a36c4d4cb66e214ea96f7892552aacf7706
Add WDiffProcessor
diff -r d07a8a36c4d4 -r 13a842224694 artifacts/doc/conf/generators.xml
--- 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"/>
diff -r d07a8a36c4d4 -r 13a842224694 artifacts/src/main/java/org/dive4elements/river/exports/process/WDiffProcessor.java
--- /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 :
More information about the Dive4elements-commits
mailing list