changeset 9595:9b39cfd39e59

Softwaretests...20181219 6.2.2: Sinfo/Ued Haupt-/Extremwerte queried for the current chart km instead of only the first in range
author mschaefer
date Tue, 05 Feb 2019 15:31:13 +0100 (2019-02-05)
parents 225e48df608c
children fbfd66e8fb81
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java	Tue Feb 05 15:24:22 2019 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java	Tue Feb 05 15:31:13 2019 +0100
@@ -16,6 +16,7 @@
 import org.apache.log4j.Logger;
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.river.artifacts.MainValuesArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WQDay;
 import org.dive4elements.river.exports.IdentifiableNumberAxis;
@@ -178,7 +179,11 @@
         } else if (FloodDurationCurveProcessor.isInfrastructureFacet(name) && (artifactFacet.getData(context) != null)) {
             doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible);
         } else if (name.equals(MAINVALUES_Q) || name.equals(MAINVALUES_W)) {
-            doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible);
+            final MainValuesArtifact mva = new MainValuesArtifactWrapper((MainValuesArtifact) artifactFacet.getArtifact());
+            if (context.getContextValue("currentKm") != null)
+                mva.addStringData("ld_locations", context.getContextValue("currentKm").toString());
+            final ArtifactAndFacet mvaf = new ArtifactAndFacet(mva, artifactFacet.getFacet());
+            doAnnotations((RiverAnnotation) mvaf.getData(context), mvaf, attr, visible);
         }
         // else if (name.equals(RELATIVE_POINT)) {
         // doPointOut((Point2D) artifactFacet.getData(context), artifactFacet, attr, visible);

http://dive4elements.wald.intevation.org