# HG changeset patch
# User gernotbelger
# Date 1522945834 -7200
# Node ID b194fa64506ae726e3c694bac5c6be6c53cc8487
# Parent 951a4af24a09ce09cd6f1bea6d33759f41accf19
SINFO - show results themes according to spec, either raw data or floating mean values.
Some improvements to error handling and handling of empty results.
diff -r 951a4af24a09 -r b194fa64506a artifacts/doc/conf/artifacts/sinfo.xml
--- a/artifacts/doc/conf/artifacts/sinfo.xml Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml Thu Apr 05 18:30:34 2018 +0200
@@ -59,8 +59,11 @@
-
-
+
+
+
+
+
@@ -109,7 +112,9 @@
+
+
@@ -168,11 +173,15 @@
+
+
+
+
@@ -181,6 +190,7 @@
+
@@ -246,11 +256,12 @@
-
-
-
-
+
+
+
+
+
diff -r 951a4af24a09 -r b194fa64506a artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml Thu Apr 05 18:30:34 2018 +0200
@@ -2093,7 +2093,8 @@
'<BR>Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) ||
'<BR>Auswerter: ' || bhs.evaluation_by AS info,
bhv.height_count AS bedh_height_count,
- bhv.min_count AS bedh_min_count,
+ bhv.min_count AS
+ bedh_min_count,
bhv.max_count AS bedh_max_count
FROM bed_height bhs
JOIN bed_height_type bht ON bht.id = bhs.type_id
@@ -3231,7 +3232,14 @@
-
+
@@ -3254,7 +3262,12 @@
-
+
@@ -3277,7 +3290,10 @@
-
+
@@ -3369,7 +3385,7 @@
-
+
@@ -3392,7 +3408,7 @@
-
+
@@ -3417,7 +3433,7 @@
-
+
diff -r 951a4af24a09 -r b194fa64506a artifacts/doc/conf/themes.xml
--- a/artifacts/doc/conf/themes.xml Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/doc/conf/themes.xml Thu Apr 05 18:30:34 2018 +0200
@@ -409,24 +409,34 @@
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java Thu Apr 05 18:30:34 2018 +0200
@@ -15,6 +15,7 @@
import org.dive4elements.artifacts.Artifact;
import org.dive4elements.river.artifacts.D4EArtifact;
import org.dive4elements.river.artifacts.sinfo.common.D50Processor;
+import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentPerYearProcessor;
import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentProcessor;
import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor;
import org.dive4elements.river.artifacts.sinfo.common.TauProcessor;
@@ -52,8 +53,9 @@
@Override
public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) {
+ final String name = facet.getName();
+
if ("sinfo_tkk".equals(output)) {
- final String name = facet.getName();
if (FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED.equals(name))
return Boolean.FALSE;
if (VelocityProcessor.FACET_TKH_VELOCITY_FILTERED.equals(name))
@@ -65,7 +67,6 @@
}
if ("sinfo_flow_depth_development".equals(output)) {
- final String name = facet.getName();
if (FlowDepthProcessor.FACET_FLOW_DEPTH_CURRENT_FILTERED.equals(name))
return Boolean.FALSE;
if (FlowDepthProcessor.FACET_FLOW_DEPTH_HISTORICAL_FILTERED.equals(name))
@@ -76,6 +77,24 @@
return Boolean.FALSE;
}
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_CURRENT_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_HISTORICAL_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_MIN_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthProcessor.FACET_FLOW_DEPTH_MAX_RAW.equals(name))
+ return Boolean.FALSE;
+
+ if (FlowDepthDevelopmentProcessor.FACET_FLOW_DEPTH_DEVELOPMENT_RAW.equals(name))
+ return Boolean.FALSE;
+ if (FlowDepthDevelopmentPerYearProcessor.FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW.equals(name))
+ return Boolean.FALSE;
+
return null;
}
});
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResult.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResult.java Thu Apr 05 18:30:34 2018 +0200
@@ -46,6 +46,10 @@
return this.wst;
}
+ public boolean isEmpty() {
+ return this.rows.isEmpty();
+ }
+
public final void addRow(final SInfoResultRow resultRow) {
this.rows.add(resultRow);
}
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResults.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResults.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResults.java Thu Apr 05 18:30:34 2018 +0200
@@ -15,6 +15,7 @@
import java.util.List;
import org.apache.commons.lang.math.DoubleRange;
+import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
/**
@@ -57,7 +58,16 @@
return this.calcRange;
}
- public final void addResult(final RESULT result) {
+ public final void addResult(final RESULT result, final Calculation problems) {
+ /* we assume error reporting was already done in this case */
+ if (result == null)
+ return;
+
+ if (result.isEmpty()) {
+ problems.addProblem("abstractsinfocalculationresults.emptyResult", result.getLabel());
+ return;
+ }
+
this.results.add(result);
}
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/D50Processor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/D50Processor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/D50Processor.java Thu Apr 05 18:30:34 2018 +0200
@@ -18,14 +18,13 @@
public final class D50Processor extends AbstractSInfoLineProcessor {
- // FIXME: check: filtered or not?
- public static final String FACET_TKH_D50_FILTERED = "sinfo_facet_d50.filtered";
+ public static final String FACET_TKH_D50_FILTERED = "sinfo_facet_d50";
private static final String I18N_AXIS_LABEL = "sinfo.chart.tkh_d50.section.yaxis.label";
private static final String SINFO_CHART_D50_YAXIS_LABEL = "sinfo.chart.tkh_d50.yaxis.label";
- private static final String I18N_FACET_TKH_D50_FILTERED_DESCRIPTION = "sinfo.facet.tkh_d50.filtered.description";
+ private static final String I18N_FACET_TKH_D50_FILTERED_DESCRIPTION = "sinfo.facet.tkh_d50.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentPerYearProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentPerYearProcessor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentPerYearProcessor.java Thu Apr 05 18:30:34 2018 +0200
@@ -15,8 +15,6 @@
import org.dive4elements.artifactdatabase.state.Facet;
import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.resources.Resources;
-import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
public final class FlowDepthDevelopmentPerYearProcessor extends AbstractSInfoLineProcessor {
@@ -25,16 +23,23 @@
private static final String SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_YAXIS_LABEL = "sinfo.chart.flow_depth_development_per_year.yaxis.label";
/* Theme name, usually defined in 'FacetTypes', but that is soooo bad dependencies... */
- // REMARK: these mustend with 'filtered' so extra handling happens in chart: point are always recalculated, because data
+ // REMARK: these must end with 'filtered' so extra handling happens in chart: point are always recalculated, because
+ // data
// changes depending on zoom state
+
public static final String FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED = "sinfo_facet_flow_depth_development_per_year.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_development_per_year.filtered.description";
+ private static final String FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_development_per_year.filtered.description";
+
+ public static final String FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW = "sinfo_facet_flow_depth_development_per_year";
+
+ private static final String FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW_DESCRIPTION = "sinfo.facet.flow_depth_development_per_year.raw.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
static {
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW);
}
public FlowDepthDevelopmentPerYearProcessor() {
@@ -46,16 +51,22 @@
if (FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthDevelopmentPerYear);
+ if (FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthDevelopmentPerYear);
final String error = String.format("Unknown facet name: %s", facetName);
throw new UnsupportedOperationException(error);
}
- public static Facet createFlowDepthDevelopmentFacet(final CallContext context, final String hash, final String id,
+ public static Facet createFlowDepthDevelopmentFilteredFacet(final CallContext context, final String hash, final String id,
final AbstractSInfoCalculationResult result, final int index) {
- final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED_DESCRIPTION,
- I18N_FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED_DESCRIPTION, result.getLabel());
- return new SInfoResultFacet(index, FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED, facetFlowDepthFilteredDescription,
- SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_YAXIS_LABEL,
+ FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED, FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthDevelopmentRawFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_YAXIS_LABEL,
+ FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW, FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW_DESCRIPTION);
}
}
\ No newline at end of file
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentProcessor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentProcessor.java Thu Apr 05 18:30:34 2018 +0200
@@ -25,24 +25,29 @@
private static final String SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL = "sinfo.chart.flow_depth.yaxis.label";
/* Theme name, usually defined in 'FacetTypes', but that is soooo bad dependencies... */
- // REMARK: these mustend with 'filtered' so extra handling happens in chart: point are always recalculated, because data
- // changes depending on zoom state
+ // REMARK: these must end with 'filtered' so extra handling happens in chart: point are always recalculated, because
+ // data changes depending on zoom state
public static final String FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED = "sinfo_facet_flow_depth_development.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_development.filtered.description";
+ private static final String FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_development.filtered.description";
+
+ public static final String FACET_FLOW_DEPTH_DEVELOPMENT_RAW = "sinfo_facet_flow_depth_development";
+
+ private static final String FACET_FLOW_DEPTH_DEVELOPMENT_RAW_DESCRIPTION = "sinfo.facet.flow_depth_development.raw.description";
public static final String FACET_WATERLEVEL_DIFFERENCE_FILTERED = "sinfo_facet_waterlevel_difference.filtered";
- private static final String I18N_FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION = "sinfo.facet.waterlevel_difference.filtered.description";
+ private static final String FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION = "sinfo.facet.waterlevel_difference.filtered.description";
public static final String FACET_BEDHEIGHT_DIFFERENCE_FILTERED = "sinfo_facet_bedheight_difference.filtered";
- private static final String I18N_FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION = "sinfo.facet.bedheight_difference.filtered.description";
+ private static final String FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION = "sinfo.facet.bedheight_difference.filtered.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
static {
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_RAW);
HANDLED_FACET_TYPES.add(FACET_WATERLEVEL_DIFFERENCE_FILTERED);
HANDLED_FACET_TYPES.add(FACET_BEDHEIGHT_DIFFERENCE_FILTERED);
}
@@ -56,6 +61,8 @@
if (FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthDevelopment);
+ if (FACET_FLOW_DEPTH_DEVELOPMENT_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthDevelopment);
if (FACET_WATERLEVEL_DIFFERENCE_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.waterlevelDifference);
@@ -67,18 +74,22 @@
throw new UnsupportedOperationException(error);
}
- public static Facet createFlowDepthDevelopmentFacet(final CallContext context, final String hash, final String id,
+ public static Facet createFlowDepthDevelopmentFilteredFacet(final CallContext context, final String hash, final String id,
final AbstractSInfoCalculationResult result, final int index) {
- final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED_DESCRIPTION,
- I18N_FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED_DESCRIPTION, result.getLabel());
- return new SInfoResultFacet(index, FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED, facetFlowDepthFilteredDescription,
- SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL,
+ FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED, FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthDevelopmentRawFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL,
+ FACET_FLOW_DEPTH_DEVELOPMENT_RAW, FACET_FLOW_DEPTH_DEVELOPMENT_RAW_DESCRIPTION);
}
public static Facet createWaterlevelDifferenceFacet(final CallContext context, final String hash, final String id,
final AbstractSInfoCalculationResult result, final int index) {
- final String facetFlowDepthTkhFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION,
- I18N_FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION, result.getLabel());
+ final String facetFlowDepthTkhFilteredDescription = Resources.getMsg(context.getMeta(), FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION,
+ FACET_WATERLEVEL_DIFFERENCE_FILTERED_DESCRIPTION, result.getLabel());
return new SInfoResultFacet(index, FACET_WATERLEVEL_DIFFERENCE_FILTERED, facetFlowDepthTkhFilteredDescription,
SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
}
@@ -86,8 +97,8 @@
public static Facet createBedHeightDifferenceFacet(final CallContext context, final String hash, final String id,
final AbstractSInfoCalculationResult result, final int index) {
- final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION,
- I18N_FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION, result.getLabel());
+ final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION,
+ FACET_BEDHEIGHT_DIFFERENCE_FILTERED_DESCRIPTION, result.getLabel());
return new SInfoResultFacet(index, FACET_BEDHEIGHT_DIFFERENCE_FILTERED, facetFlowDepthFilteredDescription,
SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
}
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java Thu Apr 05 18:30:34 2018 +0200
@@ -18,50 +18,87 @@
public final class FlowDepthProcessor extends AbstractSInfoLineProcessor {
- private static final String I18N_AXIS_LABEL = "sinfo.chart.flow_depth.section.yaxis.label";
+ private static final String AXIS_LABEL = "sinfo.chart.flow_depth.section.yaxis.label";
private static final String SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL = "sinfo.chart.flow_depth.yaxis.label";
/* Theme name, usually defined in 'FacetTypes', but that is soooo bad dependencies... */
// REMARK: these mustend with 'filtered' so extra handling happens in chart: point are always recalculated, because data
// changes depending on zoom state
+
+ /* flow depth */
public static final String FACET_FLOW_DEPTH_FILTERED = "sinfo_facet_flow_depth.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description";
+ private static final String FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description";
+ public static final String FACET_FLOW_DEPTH_RAW = "sinfo_facet_flow_depth";
+
+ private static final String FACET_FLOW_DEPTH_RAW_DESCRIPTION = "sinfo.facet.flow_depth.raw.description";
+
+ /* flow depth with tkh */
private static final String FACET_FLOW_DEPTH_TKH_FILTERED = "sinfo_facet_flow_depth_with_tkh.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_with_tkh.filtered.description";
+ private static final String FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_with_tkh.filtered.description";
+ public static final String FACET_FLOW_DEPTH_TKH_RAW = "sinfo_facet_flow_depth_with_tkh";
+
+ private static final String FACET_FLOW_DEPTH_TKH_RAW_DESCRIPTION = "sinfo.facet.flow_depth_with_tkh.raw.description";
+
+ /* minimal flow depth */
public static final String FACET_FLOW_DEPTH_MIN_FILTERED = "sinfo_facet_flow_depth_min.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_min.filtered.description";
+ private static final String FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_min.filtered.description";
+ public static final String FACET_FLOW_DEPTH_MIN_RAW = "sinfo_facet_flow_depth_min";
+
+ private static final String FACET_FLOW_DEPTH_MIN_RAW_DESCRIPTION = "sinfo.facet.flow_depth_min.raw.description";
+
+ /* maximal flow depth */
public static final String FACET_FLOW_DEPTH_MAX_FILTERED = "sinfo_facet_flow_depth_max.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_max.filtered.description";
+ private static final String FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_max.filtered.description";
+ public static final String FACET_FLOW_DEPTH_MAX_RAW = "sinfo_facet_flow_depth_max";
+
+ private static final String FACET_FLOW_DEPTH_MAX_RAW_DESCRIPTION = "sinfo.facet.flow_depth_max.raw.description";
+
+ /* current flow depth */
public static final String FACET_FLOW_DEPTH_CURRENT_FILTERED = "sinfo_facet_flow_depth_current.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_CURRENT_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_current.filtered.description";
+ private static final String FACET_FLOW_DEPTH_CURRENT_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_current.filtered.description";
+ public static final String FACET_FLOW_DEPTH_CURRENT_RAW = "sinfo_facet_flow_depth_current";
+
+ private static final String FACET_FLOW_DEPTH_CURRENT_RAW_DESCRIPTION = "sinfo.facet.flow_depth_current.raw.description";
+
+ /* historical flow depth */
public static final String FACET_FLOW_DEPTH_HISTORICAL_FILTERED = "sinfo_facet_flow_depth_historical.filtered";
- private static final String I18N_FACET_FLOW_DEPTH_HISTORICAL_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_historical.filtered.description";
+ private static final String FACET_FLOW_DEPTH_HISTORICAL_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_historical.filtered.description";
+
+ public static final String FACET_FLOW_DEPTH_HISTORICAL_RAW = "sinfo_facet_flow_depth_historical";
+
+ private static final String FACET_FLOW_DEPTH_HISTORICAL_RAW_DESCRIPTION = "sinfo.facet.flow_depth_historical.raw.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
static {
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_RAW);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_TKH_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_TKH_RAW);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MIN_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MIN_RAW);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MAX_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MAX_RAW);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_CURRENT_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_CURRENT_RAW);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_HISTORICAL_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_HISTORICAL_RAW);
}
public FlowDepthProcessor() {
- super(I18N_AXIS_LABEL, HANDLED_FACET_TYPES);
+ super(AXIS_LABEL, HANDLED_FACET_TYPES);
}
@Override
@@ -69,59 +106,107 @@
if (FACET_FLOW_DEPTH_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepth);
+ if (FACET_FLOW_DEPTH_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepth);
if (FACET_FLOW_DEPTH_TKH_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthtkh);
+ if (FACET_FLOW_DEPTH_TKH_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthtkh);
if (FACET_FLOW_DEPTH_MIN_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthmin);
+ if (FACET_FLOW_DEPTH_MIN_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthmin);
if (FACET_FLOW_DEPTH_MAX_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthmax);
+ if (FACET_FLOW_DEPTH_MAX_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthmax);
if (FACET_FLOW_DEPTH_CURRENT_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthCurrent);
+ if (FACET_FLOW_DEPTH_CURRENT_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthCurrent);
if (FACET_FLOW_DEPTH_HISTORICAL_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthHistorical);
+ if (FACET_FLOW_DEPTH_HISTORICAL_RAW.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthHistorical);
final String error = String.format("Unknown facet name: %s", facetName);
throw new UnsupportedOperationException(error);
}
- public static Facet createFlowDepthFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ public static Facet createFlowDepthFilteredFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
final int index) {
return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_FILTERED,
- I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION);
- }
-
- public static Facet createFlowDepthTkhFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
- final int index) {
- return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_TKH_FILTERED,
- I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION);
- }
-
- public static Facet createFlowDepthMinFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
- final int index) {
- return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MIN_FILTERED,
- I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION);
+ FACET_FLOW_DEPTH_FILTERED_DESCRIPTION);
}
- public static Facet createFlowDepthMaxFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ public static Facet createFlowDepthRawFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
final int index) {
- return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MAX_FILTERED,
- I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION);
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_RAW,
+ FACET_FLOW_DEPTH_RAW_DESCRIPTION);
}
- public static Facet createFlowDepthCurrentFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
- final int index) {
- return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_CURRENT_FILTERED,
- I18N_FACET_FLOW_DEPTH_CURRENT_FILTERED_DESCRIPTION);
+ public static Facet createFlowDepthTkhFilteredFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_TKH_FILTERED,
+ FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION);
}
- public static Facet createFlowDepthHistoricalFacet(final CallContext context, final String hash, final String id,
+ public static Facet createFlowDepthTkhRawFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_TKH_RAW,
+ FACET_FLOW_DEPTH_TKH_RAW_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthMinFilteredFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MIN_FILTERED,
+ FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthMinRawFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MIN_RAW,
+ FACET_FLOW_DEPTH_MIN_RAW_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthMaxFilteredFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MAX_FILTERED,
+ FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthMaxRawFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_MAX_RAW,
+ FACET_FLOW_DEPTH_MAX_RAW_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthCurrentFilteredFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_CURRENT_FILTERED,
+ FACET_FLOW_DEPTH_CURRENT_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthCurrentRawFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_CURRENT_RAW,
+ FACET_FLOW_DEPTH_CURRENT_RAW_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthHistoricalFilteredFacet(final CallContext context, final String hash, final String id,
final AbstractSInfoCalculationResult result, final int index) {
return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL,
- FACET_FLOW_DEPTH_HISTORICAL_FILTERED, I18N_FACET_FLOW_DEPTH_HISTORICAL_FILTERED_DESCRIPTION);
+ FACET_FLOW_DEPTH_HISTORICAL_FILTERED, FACET_FLOW_DEPTH_HISTORICAL_FILTERED_DESCRIPTION);
+ }
+
+ public static Facet createFlowDepthHistoricalRawFacet(final CallContext context, final String hash, final String id,
+ final AbstractSInfoCalculationResult result, final int index) {
+ return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_HISTORICAL_RAW,
+ FACET_FLOW_DEPTH_HISTORICAL_RAW_DESCRIPTION);
}
}
\ No newline at end of file
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/TauProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/TauProcessor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/TauProcessor.java Thu Apr 05 18:30:34 2018 +0200
@@ -18,14 +18,13 @@
public final class TauProcessor extends AbstractSInfoLineProcessor {
- // FIXME: check: filtered or not?
- public static final String FACET_TKH_TAU_FILTERED = "sinfo_facet_tau.filtered";
+ public static final String FACET_TKH_TAU_FILTERED = "sinfo_facet_tau";
private static final String I18N_AXIS_LABEL = "sinfo.chart.tkh_tau.section.yaxis.label";
private static final String SINFO_CHART_TAU_YAXIS_LABEL = "sinfo.chart.tkh_tau.yaxis.label";
- private static final String I18N_FACET_TKH_TAU_FILTERED_DESCRIPTION = "sinfo.facet.tkh_tau.filtered.description";
+ private static final String I18N_FACET_TKH_TAU_FILTERED_DESCRIPTION = "sinfo.facet.tkh_tau.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/VelocityProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/VelocityProcessor.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/VelocityProcessor.java Thu Apr 05 18:30:34 2018 +0200
@@ -18,14 +18,13 @@
public final class VelocityProcessor extends AbstractSInfoLineProcessor {
- // FIXME: check: filtered or not?
- public static final String FACET_TKH_VELOCITY_FILTERED = "sinfo_facet_velocity.filtered";
+ public static final String FACET_TKH_VELOCITY_FILTERED = "sinfo_facet_velocity";
private static final String I18N_AXIS_LABEL = "sinfo.chart.tkh_velocity.section.yaxis.label";
private static final String SINFO_CHART_VELOCITY_YAXIS_LABEL = "sinfo.chart.tkh_velocity.yaxis.label";
- private static final String I18N_FACET_TKH_VELOCITY_FILTERED_DESCRIPTION = "sinfo.facet.tkh_velocity.filtered.description";
+ private static final String I18N_FACET_TKH_VELOCITY_FILTERED_DESCRIPTION = "sinfo.facet.tkh_velocity.description";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java Thu Apr 05 18:30:34 2018 +0200
@@ -66,8 +66,7 @@
for (final WstSoundingIdPair diffPair : diffPairs) {
final FlowDepthCalculationResult result = calculateResult(calcRange, diffPair, problems, infoProvider, useTkh);
- if (result != null)
- results.addResult(result);
+ results.addResult(result, problems);
}
return new CalculationResult(results, problems);
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java Thu Apr 05 18:30:34 2018 +0200
@@ -83,11 +83,13 @@
final FlowDepthCalculationResult result = resultList.get(index);
/* filtered (zoom dependent mean) flow depth */
- facets.add(FlowDepthProcessor.createFlowDepthFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthRawFacet(context, hash, this.id, result, index));
if (results.isUseTkh()) {
/* filtered (zoom dependent mean) flow depth including tkh */
- facets.add(FlowDepthProcessor.createFlowDepthTkhFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthTkhFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthTkhRawFacet(context, hash, this.id, result, index));
facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index));
}
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java Thu Apr 05 18:30:34 2018 +0200
@@ -37,9 +37,8 @@
final int maxDifference = getMaxDifferenceYears(soundingYear);
final int difference = Math.abs(soundingYear - wstYear);
- if (difference > maxDifference) {
- problems.addProblem("sinfo_calc_flow_depth.warning.year_difference", label, wstYear, soundingYear);
- }
+ if (difference > maxDifference)
+ problems.addProblem("sinfo_calc_flow_depth.warning.year_difference", label, Integer.toString(wstYear), Integer.toString(soundingYear));
}
public static int getMaxDifferenceYears(final int year) {
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentCalculation.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentCalculation.java Thu Apr 05 18:30:34 2018 +0200
@@ -70,8 +70,7 @@
final FlowDepthDevelopmentCalculationResults results = new FlowDepthDevelopmentCalculationResults(calcModeLabel, user, riverInfo, calcRange);
final FlowDepthDevelopmentCalculationResult result = calculateResult(calcRange, currentPair, histPair, problems, infoProvider);
- if (result != null)
- results.addResult(result);
+ results.addResult(result, problems);
return new CalculationResult(results, problems);
}
@@ -118,8 +117,11 @@
}
// FIXME: distinguish error messages
- FlowDepthUtils.checkYearDifference("", currentWstYear, currentSoundingYear, problems);
- FlowDepthUtils.checkYearDifference("", historicalWstYear, historicalSoundingYear, problems);
+ FlowDepthUtils.checkYearDifference(Resources.getMsg(this.context.getMeta(), "flowdepthdevelopmentcalculation.yearDifferenceCurrent"), currentWstYear,
+ currentSoundingYear, problems);
+ FlowDepthUtils.checkYearDifference(Resources.getMsg(this.context.getMeta(), "flowdepthdevelopmentcalculation.yearDifferenceHistorical"),
+ historicalWstYear,
+ historicalSoundingYear, problems);
/* re-determine the reference gauge, in the same way as the WaterlevelArtifact would do it */
final RiverInfoProvider currentRiverInfoProvider = infoProvider.forWaterlevel(currentWaterlevel);
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java Thu Apr 05 18:30:34 2018 +0200
@@ -77,24 +77,28 @@
final FlowDepthDevelopmentCalculationResults results = (FlowDepthDevelopmentCalculationResults) res.getData();
final FlowDepthDevelopmentCalculationResult result = results.getResult();
- if (result == null)
- return res;
-
- /* add themes for chart, for each result */
- final int index = 0;
+ if (result != null) {
+ /* add themes for chart, for each result */
+ final int index = 0;
- // /* filtered (zoom dependent mean) flow depth development */
- facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthDevelopmentProcessor.createWaterlevelDifferenceFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthDevelopmentProcessor.createBedHeightDifferenceFacet(context, hash, this.id, result, index));
+ // /* filtered (zoom dependent mean) flow depth development */
+ facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentRawFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthDevelopmentProcessor.createWaterlevelDifferenceFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthDevelopmentProcessor.createBedHeightDifferenceFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthProcessor.createFlowDepthCurrentFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthProcessor.createFlowDepthHistoricalFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentRawFacet(context, hash, this.id, result, index));
- facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
- facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id));
+ facets.add(FlowDepthProcessor.createFlowDepthCurrentFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthCurrentRawFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthHistoricalFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthHistoricalRawFacet(context, hash, this.id, result, index));
+
+ facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
+ facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id));
+ }
final Calculation report = res.getReport();
if (report.hasProblems())
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java Thu Apr 05 18:30:34 2018 +0200
@@ -70,8 +70,7 @@
for (final MinMaxIdPair minMaxPair : minMaxPairs) {
final FlowDepthMinMaxCalculationResult result = calculateResult(calcRange, minMaxPair, problems, infoProvider);
- if (result != null)
- results.addResult(result);
+ results.addResult(result, problems);
}
return new CalculationResult(results, problems);
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java Thu Apr 05 18:30:34 2018 +0200
@@ -82,11 +82,15 @@
final FlowDepthMinMaxCalculationResult result = resultList.get(index);
/* filtered (zoom dependent mean) flow depth */
- if (result.hasMin())
- facets.add(FlowDepthProcessor.createFlowDepthMinFacet(context, hash, this.id, result, index));
+ if (result.hasMin()) {
+ facets.add(FlowDepthProcessor.createFlowDepthMinFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthMinRawFacet(context, hash, this.id, result, index));
+ }
- if (result.hasMax())
- facets.add(FlowDepthProcessor.createFlowDepthMaxFacet(context, hash, this.id, result, index));
+ if (result.hasMax()) {
+ facets.add(FlowDepthProcessor.createFlowDepthMaxFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthMaxRawFacet(context, hash, this.id, result, index));
+ }
}
if (!resultList.isEmpty()) {
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/SoilKindKmValueFinder.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/SoilKindKmValueFinder.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/SoilKindKmValueFinder.java Thu Apr 05 18:30:34 2018 +0200
@@ -86,14 +86,11 @@
return this.kmMobility.get(Double.valueOf(km));
final Entry streamUp = this.kmMobility.floorEntry(Double.valueOf(km));
- if (streamUp == null)
- {
+ if (streamUp == null) {
reportProblem(km);
return null;
}
- // FIXME: Assert minimum distance between neighbouring stations and candidate km?
-
// Return the soil kind of the neighbouring station with the shorter distance to the candidate.
final Entry streamDown = this.kmMobility.ceilingEntry(Double.valueOf(km));
if (streamDown == null)
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Thu Apr 05 18:30:34 2018 +0200
@@ -91,8 +91,7 @@
for (final WQKms wqKms : kms) {
final TkhCalculationResult result = calculateResult(calcRange, allStations, infoProvider, wqKms, bedHeights, descBuilder, problems);
- if (result != null)
- results.addResult(result);
+ results.addResult(result, problems);
}
return new CalculationResult(results, problems);
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhState.java Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhState.java Thu Apr 05 18:30:34 2018 +0200
@@ -87,7 +87,9 @@
facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index));
- facets.add(FlowDepthProcessor.createFlowDepthFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthFilteredFacet(context, hash, this.id, result, index));
+ facets.add(FlowDepthProcessor.createFlowDepthRawFacet(context, hash, this.id, result, index));
+
facets.add(VelocityProcessor.createVelocityFacet(context, hash, this.id, result, index));
facets.add(D50Processor.createD50Facet(context, hash, this.id, result, index));
facets.add(TauProcessor.createTauFacet(context, hash, this.id, result, index));
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties Thu Apr 05 18:30:34 2018 +0200
@@ -780,9 +780,9 @@
sinfo.bedheightsfinder.overlappingrange = Range of bed height {0} overlaps with other ranges.
sinfo.bedheightsfinder.missingdescription = No bed heights found with description = {0}
sinfo.bedheightsfinder.wrongriver = Bed heights {0} does not belong to river {1}
-sinfo.bedheightsfinder.configfile.missingriver = River not defined in config file '{0}': {1}
-sinfo.bedheightsfinder.configfile.loaderror = Failed to load config file '{0}': {1}
-sinfo.bedheightsfinder.notfound = Failed to access sounding with id '{0}'
+sinfo.bedheightsfinder.configfile.missingriver = River not defined in config file ''{0}'': {1}
+sinfo.bedheightsfinder.configfile.loaderror = Failed to load config file ''{0}'': {1}
+sinfo.bedheightsfinder.notfound = Failed to access sounding with id ''{0}''
sinfo.bedheightsfinder.empty = The bed heights do not contain any values for the selected calculation range
sinfo_calc_flow_depth_development=Flie\u00dftiefenentwicklung
@@ -874,11 +874,15 @@
sinfo.chart.flow_depth.section.yaxis.label=Flie\u00dftiefe [m]
sinfo.facet.flow_depth.filtered.description = h ({0})
+sinfo.facet.flow_depth.raw.description = h ({0}) (raw)
sinfo.facet.flow_depth_with_tkh.filtered.description = h + \u0394d ({0})
+sinfo.facet.flow_depth_with_tkh.raw.description = h + \u0394d ({0}) (raw)
sinfo.chart.flow_depth_minmax.section.title = min/max h-L\u00e4ngsschnitt
sinfo.facet.flow_depth_min.filtered.description = h-min ({0})
+sinfo.facet.flow_depth_min.raw.description = h-min ({0}) (raw)
sinfo.facet.flow_depth_max.filtered.description = h-max ({0})
+sinfo.facet.flow_depth_max.raw.description = h-max ({0}) (raw)
sinfo.chart.tkh.section.title=Transportk\u00f6rperh\u00f6hen
sinfo.chart.tkh.section.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
@@ -893,15 +897,15 @@
sinfo.chart.tkh_velocity.section.yaxis.label = Flie\u00dfgeschwindigkeit [m/s]
sinfo.chart.tkh_velocity.yaxis.label = Flie\u00dfgeschwindigkeit [m/s]
-sinfo.facet.tkh_velocity.filtered.description = Flie\u00dfgeschwindigkeit ({0})
+sinfo.facet.tkh_velocity.description = Flie\u00dfgeschwindigkeit ({0})
sinfo.chart.tkh_tau.section.yaxis.label = Sohlschubspannung [N/m\u00b2]
sinfo.chart.tkh_tau.yaxis.label = Sohlschubspannung [N/m\u00b2]
-sinfo.facet.tkh_tau.filtered.description = Sohlschubspannung ({0})
+sinfo.facet.tkh_tau.description = Sohlschubspannung ({0})
sinfo.chart.tkh_d50.section.yaxis.label = Sohlbeschaffenheit D50 [mm]
sinfo.chart.tkh_d50.yaxis.label = Sohlbeschaffenheit D50 [mm]
-sinfo.facet.tkh_d50.filtered.description = Sohlbeschaffenheit D50 ({0})
+sinfo.facet.tkh_d50.description = Sohlbeschaffenheit D50 ({0})
sinfo.chart.flow_depth_development.section.title = Flie\u00dftiefenentwicklung
sinfo.chart.flow_depth_development.section.yaxis.label = Flie\u00dftiefenentwicklung [cm]
@@ -912,9 +916,11 @@
sinfo.chart.flow_depth_development_per_year.yaxis.label = Flie\u00dftiefenentwicklung pro Jahr [cm/a]
sinfo.facet.flow_depth_development_per_year.filtered = \u0394h/t [cm/a]
sinfo.facet.flow_depth_development_per_year.filtered.description = \u0394h/t ({0})
+sinfo.facet.flow_depth_development_per_year.raw.description = \u0394h/t ({0}) (raw)
sinfo_facet_flow_depth_development.filtered = \u0394h [cm]
sinfo.facet.flow_depth_development.filtered.description = \u0394h ({0})
+sinfo.facet.flow_depth_development.raw.description = \u0394h ({0}) (raw)
sinfo_facet_waterlevel_difference.filtered = \u0394WSPL [cm]
sinfo.facet.waterlevel_difference.filtered.description = \u0394WSPL ({0})
@@ -924,16 +930,18 @@
sinfo_facet_flow_depth_current.filtered = h-aktuell [m]
sinfo.facet.flow_depth_current.filtered.description = h-aktuell ({0})
+sinfo.facet.flow_depth_current.raw.description = h-aktuell ({0}) (raw)
sinfo_facet_flow_depth_historical.filtered = h-historisch [m]
sinfo.facet.flow_depth_historical.filtered.description = h-historisch ({0})
+sinfo.facet.flow_depth_historical.raw.description = h-historisch ({0}) (raw)
sinfo.flowdepthminmaxcalculation.soundingyear.different = Die Peiljahre von Talweg und Kammlage untersheiden sich
sinfo.export.flow_depth_minmax.csv.header.min = Minimale Flie\u00dftiefe
sinfo.export.flow_depth_minmax.csv.header.max = Maximale Flie\u00dftiefe
-waterlevelfetcher.missing = Failed to access waterlevel with id '{0}'
+waterlevelfetcher.missing = Failed to access waterlevel with id ''{0}''
waterlevelfetcher.empty = The water level {0} does not contain any values for the selected calculation range
bedqualityd50kmvaluefinder.error = Failed to access D50 data, calculation of transport body height not possible: {0}
@@ -961,4 +969,9 @@
sinfo.export.csv.header.flowdepth.historical = Flie\u00dftiefe h-historisch
flowdepthdevelopmentcalculation.missingCurrentYear = Failed to determine date of current watterlevel ({0}), calculation not possible.
-flowdepthdevelopmentcalculation.missingHistoricalYear = Failed to determine date of historical watterlevel ({0}), calculation not possible.
\ No newline at end of file
+flowdepthdevelopmentcalculation.missingHistoricalYear = Failed to determine date of historical watterlevel ({0}), calculation not possible.
+
+abstractsinfocalculationresults.emptyResult = {0}: result set is empty, please check the data ranges of the input
+
+flowdepthdevelopmentcalculation.yearDifferenceCurrent = aktuelles Differenzenpaar
+flowdepthdevelopmentcalculation.yearDifferenceHistorical = = historisches Differenzenpaar
\ No newline at end of file
diff -r 951a4af24a09 -r b194fa64506a artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Thu Apr 05 17:12:23 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Thu Apr 05 18:30:34 2018 +0200
@@ -781,8 +781,8 @@
sinfo.bedheightsfinder.missingdescription = Sohlh\u00f6he mit -description- {0} nicht vorhanden
sinfo.bedheightsfinder.wrongriver = Sohlh\u00f6he {0} geh\u00f6rt nicht zum Gew\u00e4sser {1}
sinfo.bedheightsfinder.configfile.missingriver = Gew\u00e4sser {1} ist in Konfigurationsdatei {0} nicht definiert.
-sinfo.bedheightsfinder.configfile.loaderror = Fehler beim Laden der Konfigurationsdatei '{0}': {1}
-sinfo.bedheightsfinder.notfound = Keine Sohlh\u00f6he mit id '{0}' vorhanden
+sinfo.bedheightsfinder.configfile.loaderror = Fehler beim Laden der Konfigurationsdatei ''{0}'': {1}
+sinfo.bedheightsfinder.notfound = Keine Sohlh\u00f6he mit id ''{0}'' vorhanden
sinfo.bedheightsfinder.empty = Die Sohlh\u00f6hen enthalten keine Werte f\u00fcr die gew\u00e4hlte Berechnungsstrecke
sinfo_calc_flow_depth_development=Flie\u00dftiefenentwicklung
@@ -874,11 +874,15 @@
sinfo.chart.flow_depth.section.yaxis.label=Flie\u00dftiefe [m]
sinfo.facet.flow_depth.filtered.description = h ({0})
+sinfo.facet.flow_depth.raw.description = h ({0}) (Rohdaten)
sinfo.facet.flow_depth_with_tkh.filtered.description = h + \u0394d ({0})
+sinfo.facet.flow_depth_with_tkh.raw.description = h + \u0394d ({0}) (Rohdaten)
sinfo.chart.flow_depth_minmax.section.title = min/max h-L\u00e4ngsschnitt
sinfo.facet.flow_depth_min.filtered.description = h-min ({0})
+sinfo.facet.flow_depth_min.raw.description = h-min ({0}) (Rohdaten)
sinfo.facet.flow_depth_max.filtered.description = h-max ({0})
+sinfo.facet.flow_depth_max.raw.description = h-max ({0}) (Rohdaten)
sinfo.chart.tkh.section.title=Transportk\u00f6rperh\u00f6hen
sinfo.chart.tkh.section.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
@@ -893,15 +897,15 @@
sinfo.chart.tkh_velocity.section.yaxis.label = Flie\u00dfgeschwindigkeit [m/s]
sinfo.chart.tkh_velocity.yaxis.label = Flie\u00dfgeschwindigkeit [m/s]
-sinfo.facet.tkh_velocity.filtered.description = Flie\u00dfgeschwindigkeit ({0})
+sinfo.facet.tkh_velocity.description = Flie\u00dfgeschwindigkeit ({0})
sinfo.chart.tkh_tau.section.yaxis.label = Sohlschubspannung [N/m\u00b2]
sinfo.chart.tkh_tau.yaxis.label = Sohlschubspannung [N/m\u00b2]
-sinfo.facet.tkh_tau.filtered.description = Sohlschubspannung ({0})
+sinfo.facet.tkh_tau.description = Sohlschubspannung ({0})
sinfo.chart.tkh_d50.section.yaxis.label = Sohlbeschaffenheit D50 [mm]
sinfo.chart.tkh_d50.yaxis.label = Sohlbeschaffenheit D50 [mm]
-sinfo.facet.tkh_d50.filtered.description = Sohlbeschaffenheit D50 ({0})
+sinfo.facet.tkh_d50.description = Sohlbeschaffenheit D50 ({0})
sinfo.chart.flow_depth_development.section.title = Flie\u00dftiefenentwicklung
sinfo.chart.flow_depth_development.section.yaxis.label = Flie\u00dftiefenentwicklung [cm]
@@ -912,9 +916,11 @@
sinfo.chart.flow_depth_development_per_year.yaxis.label = Flie\u00dftiefenentwicklung pro Jahr [cm/a]
sinfo.facet.flow_depth_development_per_year.filtered = \u0394h/t [cm/a]
sinfo.facet.flow_depth_development_per_year.filtered.description = \u0394h/t ({0})
+sinfo.facet.flow_depth_development_per_year.raw.description = \u0394h/t ({0}) (Rohdaten)
sinfo_facet_flow_depth_development.filtered = \u0394h [cm]
sinfo.facet.flow_depth_development.filtered.description = \u0394h ({0})
+sinfo.facet.flow_depth_development.raw.description = \u0394h ({0}) (Rohdaten)
sinfo_facet_waterlevel_difference.filtered = \u0394WSPL [cm]
sinfo.facet.waterlevel_difference.filtered.description = \u0394WSPL ({0})
@@ -924,17 +930,19 @@
sinfo_facet_flow_depth_current.filtered = h-aktuell [m]
sinfo.facet.flow_depth_current.filtered.description = h-aktuell ({0})
+sinfo.facet.flow_depth_current.raw.description = h-aktuell ({0}) (Rohdaten)
sinfo_facet_flow_depth_historical.filtered = h-historisch [m]
sinfo.facet.flow_depth_historical.filtered.description = h-historisch ({0})
+sinfo.facet.flow_depth_historical.raw.description = h-historisch ({0}) (Rohdaten)
sinfo.flowdepthminmaxcalculation.soundingyear.different = Die Peiljahre von Talweg und Kammlage untersheiden sich
sinfo.export.flow_depth_minmax.csv.header.min = Minimale Flie\u00dftiefe
sinfo.export.flow_depth_minmax.csv.header.max = Maximale Flie\u00dftiefe
-waterlevelfetcher.missing = Fehler beim Zugriff auf Wasserspiegel mit id '{0}'
-waterlevelfetcher.empty = Der Wasserspiegel '{0}' enth\u00e4lt keine Werte f\u00fcr die gew\u00e4hlte Berechnungsstrecke
+waterlevelfetcher.missing = Fehler beim Zugriff auf Wasserspiegel mit id ''{0}''
+waterlevelfetcher.empty = Der Wasserspiegel ''{0}'' enth\u00e4lt keine Werte f\u00fcr die gew\u00e4hlte Berechnungsstrecke
bedqualityd50kmvaluefinder.error = Fehler beim Zugriff auf die D50 Daten, Transportk\u00f6rperh\u00f6henberechnung nicht m\u00f6glich: {0}
bedqualityd50kmvaluefinder.empty = F\u00fcr das Jahr {0} liegen keine D50-Korndurchmesser f\u00fcr die gew\u00e4hlte Berechnungsstrecke vor
@@ -961,4 +969,9 @@
sinfo.export.csv.header.flowdepth.historical = Flie\u00dftiefe h-historisch
flowdepthdevelopmentcalculation.missingCurrentYear = Datum des aktuellen Wasserspiegels ({0}) konnte nicht ermittelt werden, Berechnung nicht m\u00f6glich.
-flowdepthdevelopmentcalculation.missingHistoricalYear = Datum des historischen Wasserspiegels ({0}) konnte nicht ermittelt werden, Berechnung nicht m\u00f6glich.
\ No newline at end of file
+flowdepthdevelopmentcalculation.missingHistoricalYear = Datum des historischen Wasserspiegels ({0}) konnte nicht ermittelt werden, Berechnung nicht m\u00f6glich.
+
+abstractsinfocalculationresults.emptyResult = {0}: das Ergebnis enth\u00e4lt keine Daten, \u00fcberpr\u00fcfen Sie die Abdeckung der Eingangsdaten
+
+flowdepthdevelopmentcalculation.yearDifferenceCurrent = aktuelles Differenzenpaar
+flowdepthdevelopmentcalculation.yearDifferenceHistorical = = historisches Differenzenpaar
\ No newline at end of file