Mercurial > dive4elements > river
changeset 2135:77cdc344ef77
'New Chart' for discharge longitudinal section curve.
flys-artifacts/trunk@3711 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 18 Jan 2012 16:21:30 +0000 |
parents | 024d986b4f5b |
children | 3a5ef4ac8e0f |
files | flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/chart.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java |
diffstat | 4 files changed, 41 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jan 18 15:50:34 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Jan 18 16:21:30 2012 +0000 @@ -1,3 +1,15 @@ +2012-01-18 Raimund Renkert <raimund.renkert@intevation.de> + + 'New Chart' for discharge longitudinal section curve. + + * doc/conf/artifacts/chart.xml: Added transition for location input. + + * src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java: + Changed cast from WINFOArtifact to FLYSArtifact. + + * src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java: + Add an empty facet if the artifact is a ChartArtifact. + 2012-01-18 Raimund Renkert <raimund.renkert@intevation.de> 'New Chart' for duration curve.
--- a/flys-artifacts/doc/conf/artifacts/chart.xml Wed Jan 18 15:50:34 2012 +0000 +++ b/flys-artifacts/doc/conf/artifacts/chart.xml Wed Jan 18 16:21:30 2012 +0000 @@ -40,7 +40,7 @@ <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> <from state="state.chart.type"/> - <to state="state.chart.discharge_longitudinal_section"/> + <to state="state.chart.km"/> <condition data="chart_type" value="chart.new.discharge_longitudinal_section" operator="equal"/> </transition> @@ -81,23 +81,6 @@ </outputmodes> </state> - <state id="state.chart.discharge_longitudinal_section" description="state.winfo.discharge_longitudinal_section" state="de.intevation.flys.artifacts.states.DischargeLongitudinalSection"> - <outputmodes> - <outputmode name="discharge_longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png" type="chart"> - <facets> - <facet name="discharge_longitudinal_section.w"/> - <facet name="discharge_longitudinal_section.q"/> - <facet name="discharge_longitudinal_section.c"/> - <facet name="other.wqkms"/> - <facet name="other.wkms"/> - <facet name="heightmarks_points"/> - <facet name="longitudinal_section.annotations"/> - <facet name="longitudinal_section.w"/> - </facets> - </outputmode> - </outputmodes> - </state> - <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> <from state="state.chart.km"/> <to state="state.chart.computeddischargecurve"/> @@ -110,6 +93,12 @@ <condition data="chart_type" value="chart.new.durationcurve" operator="equal"/> </transition> + <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition"> + <from state="state.chart.km"/> + <to state="state.chart.discharge_longitudinal_section"/> + <condition data="chart_type" value="chart.new.discharge_longitudinal_section" operator="equal"/> + </transition> + <state id="state.chart.computeddischargecurve" description="state.chart.computeddischargecurve" state="de.intevation.flys.artifacts.states.ComputedDischargeCurveState"> <outputmodes> <outputmode name="computed_discharge_curve" description="output.computed_discharge_curve" mime-type="image/png" type="chart"> @@ -141,6 +130,22 @@ </outputmodes> </state> - + <state id="state.chart.discharge_longitudinal_section" description="state.winfo.discharge_longitudinal_section" state="de.intevation.flys.artifacts.states.DischargeLongitudinalSection"> + <outputmodes> + <outputmode name="discharge_longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png" type="chart"> + <facets> + <facet name="empty.facet" decription= "Empty"/> + <facet name="discharge_longitudinal_section.w"/> + <facet name="discharge_longitudinal_section.q"/> + <facet name="discharge_longitudinal_section.c"/> + <facet name="other.wqkms"/> + <facet name="other.wkms"/> + <facet name="heightmarks_points"/> + <facet name="longitudinal_section.annotations"/> + <facet name="longitudinal_section.w"/> + </facets> + </outputmode> + </outputmodes> + </state> </states> </artifact>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Wed Jan 18 15:50:34 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Wed Jan 18 16:21:30 2012 +0000 @@ -167,7 +167,7 @@ CallMeta meta) { logger.debug("StaticWKmsArtifact.initialize"); - WINFOArtifact winfo = (WINFOArtifact) artifact; + FLYSArtifact winfo = (FLYSArtifact) artifact; // TODO: The river is of no interest, so far. addData("river", winfo.getData("river")); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Wed Jan 18 15:50:34 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Wed Jan 18 16:21:30 2012 +0000 @@ -15,6 +15,8 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.ReportFacet; import de.intevation.flys.artifacts.model.WaterlevelFacet; +import de.intevation.flys.artifacts.model.EmptyFacet; + import de.intevation.flys.artifacts.model.WQKms; import de.intevation.flys.artifacts.model.WQCKms; import de.intevation.flys.artifacts.model.CalculationResult; @@ -38,6 +40,8 @@ Object old ) { if (artifact instanceof ChartArtifact) { + ChartArtifact chart = (ChartArtifact)artifact; + facets.add(new EmptyFacet()); return null; }