# HG changeset patch
# User gernotbelger
# Date 1539962349 -7200
# Node ID 669ab639c56bfac31bd59935c3ac99d66f440b85
# Parent 26ac94cff0b6137627473b6d58d1493e2928eda3
Implemented datacage for sinfo - ueberflutungsdauern
Implemented h/Q mainvalues in sinfo - ueberflutungsdauern chart
diff -r 26ac94cff0b6 -r 669ab639c56b artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Fri Oct 19 16:27:07 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml Fri Oct 19 17:19:09 2018 +0200
@@ -142,10 +142,9 @@
-
-
+
@@ -260,10 +259,7 @@
Duration curve
-
-
-
-
+
Reference curve
@@ -329,14 +325,9 @@
-
-
-
+
+
+
@@ -450,15 +441,23 @@
+
+
+
+
+
+
+
+
@@ -497,7 +496,7 @@
Duration curve
-
+
Reference curve
@@ -510,10 +509,6 @@
-
-
-
-
@@ -881,18 +876,30 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -900,6 +907,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 26ac94cff0b6 -r 669ab639c56b artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Fri Oct 19 16:27:07 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Fri Oct 19 17:19:09 2018 +0200
@@ -400,7 +400,8 @@
}
else if (!(pnpObject instanceof Number) &&
g != null &&
- !"duration_curve".equals(getBoundToOut())
+ !"duration_curve".equals(getBoundToOut() ) &&
+ !"sinfo_floodduration_curve".equals(getBoundToOut() )
) {
if (mv.getMainValue().getType().getName().equals("W")) {
filteredList.add(new NamedDouble(
diff -r 26ac94cff0b6 -r 669ab639c56b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveFacet.java Fri Oct 19 16:27:07 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveFacet.java Fri Oct 19 17:19:09 2018 +0200
@@ -10,16 +10,19 @@
package org.dive4elements.river.artifacts.sinfo.flood_duration;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.log4j.Logger;
import org.dive4elements.artifactdatabase.state.DefaultFacet;
import org.dive4elements.artifactdatabase.state.Facet;
import org.dive4elements.artifacts.Artifact;
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.model.DurationCurveFacet;
import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
import org.dive4elements.river.exports.fixings.FixChartGenerator;
-
/**
* Data of a flood duration curve.
*/
@@ -36,7 +39,6 @@
super(0, name, description);
}
-
/**
* Expose state computation from SINFOArtifact.
*/
@@ -51,6 +53,31 @@
return new FloodDurationCalculation(context).calcStationCurve(currentKm, (SINFOArtifact) flys);
}
+ @Override
+ public List getStaticDataProviderKeys(final Artifact art) {
+ final List list = new ArrayList<>();
+ list.add(DurationCurveFacet.BB_DURATIONCURVE);
+ return list;
+ }
+
+ /**
+ * Can provide whatever getData returns and additionally the location.
+ *
+ * @param key
+ * will respond on BB_DURATIONCURVE +KM
+ * @param param
+ * ignored
+ * @param context
+ * ignored
+ * @return whatever getData delivers or location.
+ */
+ @Override
+ public Object provideBlackboardData(final Artifact artifact, final Object key, final Object param, final CallContext context) {
+ if (key.equals(DurationCurveFacet.BB_DURATIONCURVE))
+ return getData(artifact, context);
+
+ return null;
+ }
/** Create a deep copy. */
@Override
@@ -59,5 +86,4 @@
copy.set(this);
return copy;
}
-}
-
+}
\ No newline at end of file