[PATCH 2 of 5] Softwaretests...20181219 6.2.2: Sinfo/Ued Haupt-/Extremwerte queried for the current chart km instead of only the first in range

Wald Commits scm-commit at wald.intevation.org
Tue Feb 5 15:52:17 CET 2019


# HG changeset patch
# User mschaefer
# Date 1549377073 -3600
# Node ID 9b39cfd39e591fc2a21c5ce37ddb1aea7e0d4eff
# Parent  225e48df608cdab830ca2aeabf53e4d4b1508186
Softwaretests...20181219 6.2.2: Sinfo/Ued Haupt-/Extremwerte queried for the current chart km instead of only the first in range

diff -r 225e48df608c -r 9b39cfd39e59 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java
--- 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);


More information about the Dive4Elements-commits mailing list