Mercurial > dive4elements > river
changeset 2299:094b4abde10e
fix flys/issue474 (manual points in reference curves).
flys-artifacts/trunk@3965 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 08 Feb 2012 11:32:07 +0000 |
parents | 177921b9e8bb |
children | a3dd443976bc |
files | flys-artifacts/doc/conf/artifacts/manualpoints.xml flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/doc/conf/themes.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java flys-artifacts/src/main/java/de/intevation/flys/exports/NormalizedReferenceCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java |
diffstat | 6 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/artifacts/manualpoints.xml Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/doc/conf/artifacts/manualpoints.xml Wed Feb 08 11:32:07 2012 +0000 @@ -14,6 +14,8 @@ <facet name="duration_curve.manualpoints" description="Points provided by user." /> <facet name="computed_discharge_curve.manualpoints" description="Points provided by user." /> <facet name="cross_section.manualpoints" description="Points provided by user." /> + <facet name="reference_curve.manualpoints" description="User-provided points *yawn*"/> + <facet name="reference_curve_normalized.manualpoints" description="points"/> </facets> </outputmode> </outputmodes>
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/doc/conf/artifacts/winfo.xml Wed Feb 08 11:32:07 2012 +0000 @@ -196,11 +196,13 @@ <outputmode name="reference_curve_normalized" mime-type="image/png" type="chart"> <facets> <facet name="reference_curve_normalized" description="A normalized reference curve!"/> + <facet name="reference_curve_normalized.manualpoints" description="points"/> </facets> </outputmode> <outputmode name="reference_curve" mime-type="image/png" type="chart"> <facets> <facet name="reference_curve" description="A ... reference curve!"/> + <facet name="reference_curve.manualpoints" description="points"/> </facets> </outputmode> <outputmode name="reference_curve_export" mime-type="text/plain" type="export">
--- a/flys-artifacts/doc/conf/themes.xml Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/doc/conf/themes.xml Wed Feb 08 11:32:07 2012 +0000 @@ -984,6 +984,8 @@ <mapping from="wdifferences.manualpoints" to="ManualPoints"/> <mapping from="discharge_longitudinal_section.manualpoints" to="ManualPoints"/> <mapping from="discharge_curve.manualpoints" to="ManualPoints"/> + <mapping from="reference_curve.manualpoints" to="ManualPoints"/> + <mapping from="reference_curve_normalized.manualpoints" to="ManualPoints"/> <mapping from="manualpoints" to="ManualPoints"/> <mapping from="reference_curve" to="ReferenceCurve"/> <mapping from="reference_curve_normalized" to="ReferenceCurveNormalized"/>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java Wed Feb 08 11:32:07 2012 +0000 @@ -43,6 +43,8 @@ CDC("computed_discharge_curve"), DUC("duration_curve"), DIC("discharge_curve"), + RC("reference_curve"), + RCN("reference_curve_normalized"), WD("wdifferences"); private String chartTypeString;
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/NormalizedReferenceCurveGenerator.java Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/NormalizedReferenceCurveGenerator.java Wed Feb 08 11:32:07 2012 +0000 @@ -185,6 +185,11 @@ if (name.equals(REFERENCE_CURVE_NORMALIZED)) { doReferenceOut(artifactFacet.getData(context), theme, visible); } + else if (FacetTypes.IS.MANUALPOINTS(name)) { + doPoints(artifactFacet.getData(context), + artifactFacet.getFacetDescription(), + theme, visible, YAXIS.W_M.idx); + } else { logger.warn("Unknown facet name: " + name); return;
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java Wed Feb 08 11:16:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java Wed Feb 08 11:32:07 2012 +0000 @@ -16,6 +16,7 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WW; +import de.intevation.flys.artifacts.model.WWQQ; import de.intevation.flys.artifacts.model.WW.ApplyFunctionIterator; import de.intevation.flys.artifacts.model.WWAxisTypes; @@ -185,6 +186,11 @@ if (name.equals(REFERENCE_CURVE)) { doReferenceOut(artifactFacet.getData(context), theme, visible); } + else if (FacetTypes.IS.MANUALPOINTS(name)) { + doPoints(artifactFacet.getData(context), + artifactFacet.getFacetDescription(), + theme, visible, YAXIS.W_M.idx); + } else { logger.warn("Unknown facet name: " + name); return;