Mercurial > dive4elements > river
changeset 1152:fc572b30f1b8
Added configuration to kick-in w-differences branch of winfo.
flys-artifacts/trunk@2683 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 09 Sep 2011 10:13:22 +0000 |
parents | 08048bd090e6 |
children | 62ad0a753b68 |
files | flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/doc/conf/conf.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveInfoGenerator.java |
diffstat | 5 files changed, 66 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Sep 09 10:07:14 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Sep 09 10:13:22 2011 +0000 @@ -1,3 +1,18 @@ +2011-09-09 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Added configuration to kick-in w-differences branch of winfo. + + * doc/conf/conf.xml: Register new (w-differences) OutputGenerators. + + * doc/conf/artifacts/winfo.xml: Register new state and transitions. + + * src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java: + Added new (w-differences) calculation mode. + + * src/main/java/de/intevation/flys/exports/WDifferencesCurveInfoGenerator.java: + New file, implementing naive approach to display w-differences + (accidentially omitted in last commit). + 2011-09-09 Felix Wolfsteller <felix.wolfsteller@intevation.de> Added very stubby WDifferences State/OutGenerator for WINFOArtifact. @@ -9,9 +24,8 @@ New file, implements naive approach to calculate w-differences (of calculations identified by hardcoded uuids!) and register respective facet. - * src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java: - src/main/java/de/intevation/flys/exports/WDifferencesCurveInfoGenerator.java: - New files, implementing naive approach to display w-differences. + * src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java, + New file, implementing naive approach to display w-differences. 2011-09-09 Felix Wolfsteller <felix.wolfsteller@intevation.de>
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml Fri Sep 09 10:07:14 2011 +0000 +++ b/flys-artifacts/doc/conf/artifacts/winfo.xml Fri Sep 09 10:13:22 2011 +0000 @@ -12,7 +12,7 @@ </transition> <state id="state.winfo.calculation_mode" description="state.winfo.calculation_mode" state="de.intevation.flys.artifacts.states.CalculationSelect"> - <data name="calculation_mode" type="String" /> + <data name="calculation_mode" type="String" /> </state> <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> @@ -39,6 +39,12 @@ <condition data="calculation_mode" value="calc.discharge.longitudinal.section" operator="equal"/> </transition> + <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> + <from state="state.winfo.calculation_mode"/> + <to state="state.winfo.w_differences"/> + <condition data="calculation_mode" value="calc.w.differences" operator="equal"/> + </transition> + <state id="state.winfo.location" description="state.winfo.location" state="de.intevation.flys.artifacts.states.LocationSelect"> <data name="ld_locations" type="Double[]" /> @@ -106,6 +112,12 @@ <condition data="calculation_mode" value="calc.discharge.curve" operator="equal"/> </transition> + <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> + <from state="state.winfo.location"/> + <to state="state.winfo.w_differences"/> + <condition data="calculation_mode" value="calc.w.differences" operator="equal"/> + </transition> + <state id="state.winfo.wq" description="state.winfo.wq" state="de.intevation.flys.artifacts.states.WQSelect"> <data name="wq_mode" type="String" /> <data name="wq_free" type="Boolean" /> @@ -122,6 +134,18 @@ <data name="wq_values" type="WQTriple" /> </state> + <state id="state.winfo.w_differences" description="state.winfo.w_differences" state="de.intevation.flys.artifacts.states.WDifferencesState"> + <data name="uuid" type="String" /> + + <outputmodes> + <outputmode name="w_differences" description="output.w_differences" mime-type="image/png" type="chart"> + <facets> + <facet name="w_differences" description="facet.w_differences"/> + </facets> + </outputmode> + </outputmodes> + </state> + <state id="state.winfo.durationcurve" description="state.winfo.durationcurve" state="de.intevation.flys.artifacts.states.DurationCurveState"> <outputmodes> <outputmode name="duration_curve" description="output.duration_curve" mime-type="image/png" type="chart">
--- a/flys-artifacts/doc/conf/conf.xml Fri Sep 09 10:07:14 2011 +0000 +++ b/flys-artifacts/doc/conf/conf.xml Fri Sep 09 10:13:22 2011 +0000 @@ -101,6 +101,8 @@ <output-generator name="durationcurve_export">de.intevation.flys.exports.DurationCurveExporter</output-generator> <output-generator name="computed_dischargecurve_export">de.intevation.flys.exports.ComputedDischargeCurveExporter</output-generator> <output-generator name="discharge_longitudinal_section_export">de.intevation.flys.exports.DischargeLongitudinalSectionExporter</output-generator> + <output-generator name="w_differences">de.intevation.flys.exports.WDifferencesCurveGenerator</output-generator> + <output-generator name="w_differences_chartinfo">de.intevation.flys.exports.WDifferencesCurveInfoGenerator</output-generator> <!-- Error report generators. --> <output-generator name="discharge_longitudinal_section_report">de.intevation.flys.exports.ReportGenerator</output-generator> <output-generator name="waterlevel_report">de.intevation.flys.exports.ReportGenerator</output-generator>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java Fri Sep 09 10:07:14 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java Fri Sep 09 10:13:22 2011 +0000 @@ -47,13 +47,18 @@ public static final String CALCULATION_DISCHARGE_CURVE = "calc.discharge.curve"; - /** An array that holds all available calculation modes.*/ + /** Constant value for the state w differences calculation. */ + public static final String CALCULATION_W_DIFFERENCES = + "calc.w.differences"; + + /** An array that holds all available calculation modes. */ public static final String[] CALCULATIONS = { CALCULATION_SURFACE_CURVE, CALCULATION_FLOOD_MAP, CALCULATION_DISCHARGE_CURVE, CALCULATION_DURATION_CURVE, - CALCULATION_DISCHARGE_LONGITUDINAL_CURVE }; + CALCULATION_DISCHARGE_LONGITUDINAL_CURVE, + CALCULATION_W_DIFFERENCES }; /** Error message that is thrown if no mode has been chosen. */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveInfoGenerator.java Fri Sep 09 10:13:22 2011 +0000 @@ -0,0 +1,15 @@ +package de.intevation.flys.exports; + + +/** + * A ChartInfoGenerator that generates meta information for specific + * w differences. + */ +public class WDifferencesCurveInfoGenerator +extends ChartInfoGenerator +{ + public WDifferencesCurveInfoGenerator() { + super(new WDifferencesCurveGenerator()); + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :