# HG changeset patch # User gernotbelger # Date 1521549007 -3600 # Node ID ee5ce13016ed1872f8e2dcb176715c20d75da35a # Parent 798d9dcbccddcf00bbb9065395e045d16ffa2805 Work on SINFO-Fließtiefenentwicklung diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/artifacts/sinfo.xml --- a/artifacts/doc/conf/artifacts/sinfo.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/artifacts/sinfo.xml Tue Mar 20 13:30:07 2018 +0100 @@ -167,10 +167,20 @@ - + + + + + + + + + + + + + + diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml --- a/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Tue Mar 20 13:30:07 2018 +0100 @@ -16,6 +16,9 @@ + + + @@ -50,6 +53,8 @@ + + \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/generators/longitudinal-diagrams.xml --- a/artifacts/doc/conf/generators/longitudinal-diagrams.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/generators/longitudinal-diagrams.xml Tue Mar 20 13:30:07 2018 +0100 @@ -108,7 +108,7 @@ names="sinfo_flow_depth_minmax,sinfo_flow_depth_minmax_chartinfo" class="org.dive4elements.river.exports.LongitudinalSectionGenerator2" converter="org.dive4elements.river.exports.DiagramAttributes"> - + <title key="sinfo.chart.flow_depth_minmax.section.title" default="min/max h-Längsschnitt (DEFAULT)"/> &longitudinal-defaults; <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="FlowDepth"/> @@ -129,4 +129,31 @@ <arg expr="artifact.river"/> </subtitle> </output-generator> + + <output-generator + names="sinfo_flow_depth_development,sinfo_flow_depth_development_chartinfo" + class="org.dive4elements.river.exports.LongitudinalSectionGenerator2" + converter="org.dive4elements.river.exports.DiagramAttributes"> + <title key="sinfo.chart.flow_depth_development.section.title" default="Fließtiefenentwicklung (DEFAULT)"/> + &longitudinal-defaults; + <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" + axis="FlowDepth"/> + <subtitle key="chart.w_differences.subtitle" default="-"> + <arg expr="artifact.river"/> + </subtitle> + </output-generator> + + <output-generator + names="sinfo_flow_depth_development_peryear,sinfo_flow_depth_development_peryear_chartinfo" + class="org.dive4elements.river.exports.LongitudinalSectionGenerator2" + converter="org.dive4elements.river.exports.DiagramAttributes"> + <title key="sinfo.chart.flow_depth_development_perYear.section.title" default="Fließtiefenentwicklung pro Jahr (DEFAULT)"/> + &longitudinal-defaults; + <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" + axis="FlowDepth"/> + <subtitle key="chart.w_differences.subtitle" default="-"> + <arg expr="artifact.river"/> + </subtitle> + </output-generator> + </longitudinal-diagrams> \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/meta-data.xml --- a/artifacts/doc/conf/meta-data.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/meta-data.xml Tue Mar 20 13:30:07 2018 +0100 @@ -124,6 +124,12 @@ <dc:when test="$out = 'sinfo_flow_depth_minmax'"> <dc:call-macro name="annotations"/> </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development'"> + <dc:call-macro name="annotations"/> + </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> + <dc:call-macro name="annotations"/> + </dc:when> <dc:when test="$out = 'sinfo_tkk'"> <dc:call-macro name="annotations"/> </dc:when> @@ -272,6 +278,12 @@ <dc:when test="$out = 'sinfo_flow_depth_minmax'"> <dc:call-macro name="longitudinal-section-prototype"/> </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development'"> + <dc:call-macro name="longitudinal-section-prototype"/> + </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> + <dc:call-macro name="longitudinal-section-prototype"/> + </dc:when> <dc:when test="$out = 'sinfo_tkk'"> <dc:call-macro name="longitudinal-section-prototype"/> </dc:when> @@ -361,6 +373,12 @@ <dc:when test="$out = 'sinfo_flow_depth_minmax'"> <dc:call-macro name="longitudinal-section-user-prototype"/> </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development'"> + <dc:call-macro name="longitudinal-section-user-prototype"/> + </dc:when> + <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> + <dc:call-macro name="longitudinal-section-user-prototype"/> + </dc:when> <dc:when test="$out = 'sinfo_tkk'"> <dc:call-macro name="longitudinal-section-user-prototype"/> </dc:when> @@ -1541,8 +1559,12 @@ <dc:comment> SINFO </dc:comment> <dc:call-macro name="sinfo_flowdepths"/> <dc:call-macro name="sinfo_flowdepths_minmax"/> + <dc:call-macro name="sinfo_flow_depth_development"/> <dc:call-macro name="sinfo_tkh"/> + <dc:call-macro name="sinfo_waterlevel_difference"/> + <dc:call-macro name="sinfo_bedheight_difference"/> + <dc:call-macro name="sinfo_tkh_velocity"/> <dc:call-macro name="sinfo_tkh_d50"/> <dc:call-macro name="sinfo_tkh_tau"/> @@ -3093,8 +3115,7 @@ </dc:macro> <dc:macro name="sinfo_flowdepths"> - <!-- dc:filter expr="($out_name = 'sinfo_flow_depth' and ($facet_name = 'sinfo_flow_depth.filtered' or $facet_name = 'sinfo_flow_depth.tkh.filtered' ) )" --> - <dc:filter expr="( $facet_name = 'sinfo_facet_flow_depth.filtered' or $facet_name = 'sinfo_facet_flow_depth_with_tkh.filtered' )"> + <dc:filter expr="( $facet_name = 'sinfo_facet_flow_depth.filtered' or $facet_name = 'sinfo_facet_flow_depth_with_tkh.filtered' or $facet_name = 'sinfo_facet_flow_depth_current.filtered' or $facet_name = 'sinfo_facet_flow_depth_historical.filtered' )"> <dc:if test="dc:has-result()"> <sinfo_flow_depths> <dc:call-macro name="collection-group"> @@ -3139,6 +3160,75 @@ </dc:filter> </dc:macro> + <dc:macro name="sinfo_flow_depth_development"> + <dc:filter expr="$facet_name = 'sinfo_facet_flow_depth_development.filtered' or $facet_name = 'sinfo_facet_flow_depth_development_per_year.filtered'"> + <dc:if test="dc:has-result()"> + <sinfo_flow_depth_developments> + <dc:call-macro name="collection-group"> + <sinfo_flow_depth_development description="{dc:group-key()}"> + <dc:for-each> + <dc:element name="${facet_name}"> + <dc:attribute name="factory" value="sinfo"/> + <dc:attribute name="target_out" value="${out}"/> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="${out_name}"/> + </dc:element> + </dc:for-each> + </sinfo_flow_depth_development> + </dc:call-macro> + </sinfo_flow_depth_developments> + </dc:if> + </dc:filter> + </dc:macro> + + <dc:macro name="sinfo_waterlevel_difference"> + <dc:filter expr="$facet_name = 'sinfo_facet_waterlevel_difference.filtered'"> + <dc:if test="dc:has-result()"> + <sinfo_waterlevel_differences> + <dc:call-macro name="collection-group"> + <sinfo_waterlevel_difference description="{dc:group-key()}"> + <dc:for-each> + <dc:element name="${facet_name}"> + <dc:attribute name="factory" value="sinfo"/> + <dc:attribute name="target_out" value="${out}"/> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="${out_name}"/> + </dc:element> + </dc:for-each> + </sinfo_waterlevel_difference> + </dc:call-macro> + </sinfo_waterlevel_differences> + </dc:if> + </dc:filter> + </dc:macro> + + <dc:macro name="sinfo_bedheight_difference"> + <dc:filter expr="$facet_name = 'sinfo_facet_bedheight_difference.filtered'"> + <dc:if test="dc:has-result()"> + <sinfo_bedheight_differences> + <dc:call-macro name="collection-group"> + <sinfo_bedheight_difference description="{dc:group-key()}"> + <dc:for-each> + <dc:element name="${facet_name}"> + <dc:attribute name="factory" value="sinfo"/> + <dc:attribute name="target_out" value="${out}"/> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="${out_name}"/> + </dc:element> + </dc:for-each> + </sinfo_bedheight_difference> + </dc:call-macro> + </sinfo_bedheight_differences> + </dc:if> + </dc:filter> + </dc:macro> + <dc:macro name="sinfo_tkh"> <dc:filter expr="$facet_name = 'sinfo_facet_tkh' or $facet_name = 'sinfo_facet_tkh'"> <dc:if test="dc:has-result()"> diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/themes.xml --- a/artifacts/doc/conf/themes.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/themes.xml Tue Mar 20 13:30:07 2018 +0100 @@ -410,10 +410,22 @@ <mapping from="sinfo_facet_flow_depth_with_tkh.filtered" to="SInfoFlowDepthWithTkh" /> <mapping from="sinfo_facet_flow_depth_min.filtered" to="SInfoFlowDepthMin" /> <mapping from="sinfo_facet_flow_depth_max.filtered" to="SInfoFlowDepthMax" /> + + <mapping from="sinfo_facet_flow_depth_current.filtered" to="SInfoFlowDepthCurrent" /> + <mapping from="sinfo_facet_flow_depth_historical.filtered" to="SInfoFlowDepthHistorical" /> + <mapping from="sinfo_facet_tkh" to="SInfoTkh" /> <mapping from="sinfo_facet_d50.filtered" to="BedDiameterTopLines" /> <mapping from="sinfo_facet_tau.filtered" to="FlowVelocityTau" /> <mapping from="sinfo_facet_velocity.filtered" to="FlowVelocityVMainChannel" /> + + <mapping from="sinfo_facet_flow_depth_current.filtered" to="FlowVelocityVMainChannel" /> + <mapping from="sinfo_facet_flow_depth_historical.filtered" to="FlowVelocityVMainChannel" /> + + <mapping from="sinfo_facet_flow_depth_development.filtered" to="SInfoFlowDepthDevelopment" /> + <mapping from="sinfo_facet_flow_depth_development_per_year.filtered" to="SInfoFlowDepthDevelopmentPerYear" /> + <mapping from="sinfo_facet_waterlevel_difference.filtered" to="SInfoWaterlevelDifference" /> + <mapping from="sinfo_facet_bedheight_difference.filtered" to="SInfoBedHeightDifference" /> </mappings> </themes> \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/themes/default.xml --- a/artifacts/doc/conf/themes/default.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/themes/default.xml Tue Mar 20 13:30:07 2018 +0100 @@ -2906,6 +2906,22 @@ <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> </fields> </theme> + <theme name="SInfoFlowDepthCurrent"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 128" /> + </fields> + </theme> + <theme name="SInfoFlowDepthHistorical"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="51, 102, 255" /> + </fields> + </theme> <theme name="SInfoTkh"> <inherits> <inherit from="LongitudinalSection" /> @@ -2927,4 +2943,36 @@ <field name="showarealabel" type="boolean" display="Flächenbeschriftung anzeigen" default="false" hint="hidden"/> </fields> </theme> + <theme name="SInfoFlowDepthDevelopment"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> + </fields> + </theme> + <theme name="SInfoFlowDepthDevelopmentPerYear"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> + </fields> + </theme> + <theme name="SInfoWaterlevelDifference"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="102, 255, 102" /> + </fields> + </theme> + <theme name="SInfoBedHeightDifference"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="255, 0, 0" /> + </fields> + </theme> </themegroup> \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/doc/conf/themes/second.xml --- a/artifacts/doc/conf/themes/second.xml Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/doc/conf/themes/second.xml Tue Mar 20 13:30:07 2018 +0100 @@ -2674,7 +2674,6 @@ </fields> </theme> - <theme name="SQOutliersOverviewA"> <inherits> <inherit from="SQOutliersA" /> @@ -2895,6 +2894,22 @@ <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> </fields> </theme> + <theme name="SInfoFlowDepthCurrent"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 128" /> + </fields> + </theme> + <theme name="SInfoFlowDepthHistorical"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="51, 102, 255" /> + </fields> + </theme> <theme name="SInfoTkh"> <inherits> <inherit from="LongitudinalSection" /> @@ -2916,4 +2931,36 @@ <field name="showarealabel" type="boolean" display="Flächenbeschriftung anzeigen" default="false" hint="hidden"/> </fields> </theme> + <theme name="SInfoFlowDepthDevelopment"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> + </fields> + </theme> + <theme name="SInfoFlowDepthDevelopmentPerYear"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 255" /> + </fields> + </theme> + <theme name="SInfoWaterlevelDifference"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="102, 255, 102" /> + </fields> + </theme> + <theme name="SInfoBedHeightDifference"> + <inherits> + <inherit from="LongitudinalSectionW" /> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="255, 0, 0" /> + </fields> + </theme> </themegroup> \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java Tue Mar 20 13:30:07 2018 +0100 @@ -10,7 +10,15 @@ package org.dive4elements.river.artifacts.sinfo; import org.apache.commons.lang.StringUtils; +import org.dive4elements.artifactdatabase.state.Facet; +import org.dive4elements.artifactdatabase.state.FacetActivity; +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.FlowDepthDevelopmentProcessor; +import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor; +import org.dive4elements.river.artifacts.sinfo.common.TauProcessor; +import org.dive4elements.river.artifacts.sinfo.common.VelocityProcessor; /** * The default SINFO artifact. @@ -37,6 +45,42 @@ private static final String FIELD_MODE = "calculation_mode"; + static { + // Active/deactivate facets. + // BEWARE: we can only define one activity for "sinfo", so we use the artifact as place for this + FacetActivity.Registry.getInstance().register("sinfo", new FacetActivity() { + @Override + public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) { + + 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)) + return Boolean.FALSE; + if (TauProcessor.FACET_TKH_TAU_FILTERED.equals(name)) + return Boolean.FALSE; + if (D50Processor.FACET_TKH_D50_FILTERED.equals(name)) + return Boolean.FALSE; + } + + 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)) + return Boolean.FALSE; + if (FlowDepthDevelopmentProcessor.FACET_WATERLEVEL_DIFFERENCE_FILTERED.equals(name)) + return Boolean.FALSE; + if (FlowDepthDevelopmentProcessor.FACET_BEDHEIGHT_DIFFERENCE_FILTERED.equals(name)) + return Boolean.FALSE; + } + + return null; + } + }); + } + /** * Default constructor, because it's serializable. */ diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoLineProcessor.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoLineProcessor.java Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoLineProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -14,6 +14,7 @@ import java.util.Set; import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; +import org.dive4elements.artifactdatabase.state.Facet; import org.dive4elements.artifacts.Artifact; import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.D4EArtifact; @@ -21,6 +22,8 @@ import org.dive4elements.river.artifacts.context.RiverContext; import org.dive4elements.river.artifacts.math.MovingAverage; import org.dive4elements.river.artifacts.model.ZoomScale; +import org.dive4elements.river.artifacts.resources.Resources; +import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; import org.dive4elements.river.exports.DiagramGenerator; import org.dive4elements.river.exports.StyledSeriesBuilder; import org.dive4elements.river.jfree.StyledXYSeries; @@ -75,12 +78,10 @@ return scales.getRadius(river, start, end); } - private double[][] generatePoints(final CallContext context, final Artifact artifact, final RESULT data, - final String facetName) { + private double[][] generatePoints(final CallContext context, final Artifact artifact, final RESULT data, final String facetName) { final double[][] points = doGetPoints(data, facetName); - if( facetName.endsWith(".filtered")) - { + if (facetName.endsWith(".filtered")) { final Double radius = findRadius(context, artifact); return movingAverage(radius, points); } @@ -97,4 +98,10 @@ return MovingAverage.weighted(points, radius); } + + protected static final Facet createFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result, + final int index, final String axisLabel, final String facetId, final String description) { + final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), description, description, result.getLabel()); + return new SInfoResultFacet(index, facetId, facetFlowDepthFilteredDescription, axisLabel, ComputeType.ADVANCE, id, hash); + } } \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/D50Processor.java Tue Mar 20 13:30:07 2018 +0100 @@ -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 D50Processor extends AbstractSInfoLineProcessor<AbstractTkhCalculationResult> { @@ -51,9 +49,7 @@ public static Facet createD50Facet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result, final int index) { - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_TKH_D50_FILTERED_DESCRIPTION, - I18N_FACET_TKH_D50_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, D50Processor.FACET_TKH_D50_FILTERED, facetFlowDepthFilteredDescription, SINFO_CHART_D50_YAXIS_LABEL, - ComputeType.ADVANCE, id, hash); + return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_D50_YAXIS_LABEL, FACET_TKH_D50_FILTERED, + I18N_FACET_TKH_D50_FILTERED_DESCRIPTION); } } \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentPerYearProcessor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentPerYearProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -0,0 +1,61 @@ +/* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.artifacts.sinfo.common; + +import java.util.HashSet; +import java.util.Set; + +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<AbstractSInfoCalculationResult> { + + private static final String I18N_AXIS_LABEL = "sinfo.chart.flow_depth_development_per_year.section.yaxis.label"; + + 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 + // 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 Set<String> HANDLED_FACET_TYPES = new HashSet<>(); + + static { + HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED); + } + + public FlowDepthDevelopmentPerYearProcessor() { + super(I18N_AXIS_LABEL, HANDLED_FACET_TYPES); + } + + @Override + protected double[][] doGetPoints(final AbstractSInfoCalculationResult data, final String facetName) { + + if (FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_FILTERED.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, + 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); + } +} \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentProcessor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthDevelopmentProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -0,0 +1,94 @@ +/* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.artifacts.sinfo.common; + +import java.util.HashSet; +import java.util.Set; + +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 FlowDepthDevelopmentProcessor extends AbstractSInfoLineProcessor<AbstractSInfoCalculationResult> { + + private static final String I18N_AXIS_LABEL = "sinfo.chart.flow_depth_development.section.yaxis.label"; + + 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 + 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"; + + 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"; + + 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 Set<String> HANDLED_FACET_TYPES = new HashSet<>(); + + static { + HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED); + HANDLED_FACET_TYPES.add(FACET_WATERLEVEL_DIFFERENCE_FILTERED); + HANDLED_FACET_TYPES.add(FACET_BEDHEIGHT_DIFFERENCE_FILTERED); + } + + public FlowDepthDevelopmentProcessor() { + super(I18N_AXIS_LABEL, HANDLED_FACET_TYPES); + } + + @Override + protected double[][] doGetPoints(final AbstractSInfoCalculationResult data, final String facetName) { + + if (FACET_FLOW_DEPTH_DEVELOPMENT_FILTERED.contentEquals(facetName)) + return data.getStationPoints(SInfoResultType.flowdepthDevelopment); + + if (FACET_WATERLEVEL_DIFFERENCE_FILTERED.contentEquals(facetName)) + return data.getStationPoints(SInfoResultType.waterlevelDifference); + + if (FACET_BEDHEIGHT_DIFFERENCE_FILTERED.contentEquals(facetName)) + return data.getStationPoints(SInfoResultType.bedHeightDifference); + + 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, + 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); + } + + 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()); + return new SInfoResultFacet(index, FACET_WATERLEVEL_DIFFERENCE_FILTERED, facetFlowDepthTkhFilteredDescription, + SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL, ComputeType.ADVANCE, id, hash); + } + + 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()); + return new SInfoResultFacet(index, FACET_BEDHEIGHT_DIFFERENCE_FILTERED, facetFlowDepthFilteredDescription, + SINFO_CHART_FLOW_DEPTH_DEVELOPMENT_YAXIS_LABEL, ComputeType.ADVANCE, id, hash); + } +} \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -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 FlowDepthProcessor extends AbstractSInfoLineProcessor<AbstractSInfoCalculationResult> { @@ -43,6 +41,14 @@ private static final String I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_max.filtered.description"; + 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"; + + 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 Set<String> HANDLED_FACET_TYPES = new HashSet<>(); static { @@ -50,6 +56,8 @@ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_TKH_FILTERED); HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MIN_FILTERED); HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MAX_FILTERED); + HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_CURRENT_FILTERED); + HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_HISTORICAL_FILTERED); } public FlowDepthProcessor() { @@ -71,41 +79,49 @@ if (FACET_FLOW_DEPTH_MAX_FILTERED.contentEquals(facetName)) return data.getStationPoints(SInfoResultType.flowdepthmax); + if (FACET_FLOW_DEPTH_CURRENT_FILTERED.contentEquals(facetName)) + return data.getStationPoints(SInfoResultType.flowdepthCurrent); + + if (FACET_FLOW_DEPTH_HISTORICAL_FILTERED.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, final int index) { - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, facetFlowDepthFilteredDescription, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, - ComputeType.ADVANCE, id, hash); + 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) { - final String facetFlowDepthTkhFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription, - SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash); + 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) { - - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_MIN_FILTERED, facetFlowDepthFilteredDescription, - SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash); + 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); } public static Facet createFlowDepthMaxFacet(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); + } - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_MAX_FILTERED, facetFlowDepthFilteredDescription, - SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash); + 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 createFlowDepthHistoricalFacet(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); } } \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/TauProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -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 TauProcessor extends AbstractSInfoLineProcessor<AbstractTkhCalculationResult> { @@ -51,9 +49,7 @@ public static Facet createTauFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result, final int index) { - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_TKH_TAU_FILTERED_DESCRIPTION, - I18N_FACET_TKH_TAU_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, TauProcessor.FACET_TKH_TAU_FILTERED, facetFlowDepthFilteredDescription, SINFO_CHART_TAU_YAXIS_LABEL, - ComputeType.ADVANCE, id, hash); + return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_TAU_YAXIS_LABEL, FACET_TKH_TAU_FILTERED, + I18N_FACET_TKH_TAU_FILTERED_DESCRIPTION); } } \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/VelocityProcessor.java Tue Mar 20 13:30:07 2018 +0100 @@ -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 VelocityProcessor extends AbstractSInfoLineProcessor<AbstractTkhCalculationResult> { @@ -51,9 +49,7 @@ public static Facet createVelocityFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result, final int index) { - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_TKH_VELOCITY_FILTERED_DESCRIPTION, - I18N_FACET_TKH_VELOCITY_FILTERED_DESCRIPTION, result.getLabel()); - return new SInfoResultFacet(index, VelocityProcessor.FACET_TKH_VELOCITY_FILTERED, facetFlowDepthFilteredDescription, SINFO_CHART_VELOCITY_YAXIS_LABEL, - ComputeType.ADVANCE, id, hash); + return AbstractSInfoLineProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_VELOCITY_YAXIS_LABEL, FACET_TKH_VELOCITY_FILTERED, + I18N_FACET_TKH_VELOCITY_FILTERED_DESCRIPTION); } } \ No newline at end of file diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java Tue Mar 20 13:30:07 2018 +0100 @@ -22,6 +22,9 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.ReportFacet; import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; +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.states.DefaultState; /** @@ -77,22 +80,18 @@ if (result == null) return res; - // /* add themes for chart, for each result */ - // final List<FlowDepthCalculationResult> resultList = results.getResults(); - // for (int index = 0; index < resultList.size(); index++) { - // - // final FlowDepthCalculationResult result = resultList.get(index); - // - // /* filtered (zoom dependent mean) flow depth */ - // facets.add(FlowDepthProcessor.createFlowDepthFacet(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(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); - // } - // } + /* 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)); + + facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentFacet(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(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id)); facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id)); diff -r 798d9dcbccdd -r ee5ce13016ed 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 Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhState.java Tue Mar 20 13:30:07 2018 +0100 @@ -11,8 +11,6 @@ import java.util.List; import org.dive4elements.artifactdatabase.state.Facet; -import org.dive4elements.artifactdatabase.state.FacetActivity; -import org.dive4elements.artifacts.Artifact; import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.ChartArtifact; import org.dive4elements.river.artifacts.D4EArtifact; @@ -38,31 +36,6 @@ private static final long serialVersionUID = 1L; - static { - // Active/deactivate facets. - // BEWARE: we can only define one activity for "sinfo", so this is not the right place.... - FacetActivity.Registry.getInstance().register("sinfo", new FacetActivity() { - @Override - public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) { - - /* only */ - 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)) - return Boolean.FALSE; - if (TauProcessor.FACET_TKH_TAU_FILTERED.equals(name)) - return Boolean.FALSE; - if (D50Processor.FACET_TKH_D50_FILTERED.equals(name)) - return Boolean.FALSE; - } - - return null; - } - }); - } - /** * From this state can only be continued trivially. */ diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/resources/messages.properties --- a/artifacts/src/main/resources/messages.properties Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/resources/messages.properties Tue Mar 20 13:30:07 2018 +0100 @@ -815,7 +815,10 @@ help.state.sinfo.use_transport_bodies=${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies state.sinfo.flow_depth_minmax = minimale/maximale Flie\u00dftiefen -help.state.sinfo.use_transport_bodies = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies +help.state.sinfo.flow_depth_minmax = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flow_depth_minmax + +state.sinfo.flow_depth_development = Flie\u00dftiefenentwicklung +help.state.sinfo.flow_depth_development = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flow_depth_development useTransportBodies.option = Transportk\u00f6rperh\u00f6hen miteinbeziehen? useTransportBodies.active = Activ @@ -901,6 +904,31 @@ sinfo.chart.tkh_d50.yaxis.label = Sohlbeschaffenheit D50 [mm] sinfo.facet.tkh_d50.filtered.description = Sohlbeschaffenheit D50 ({0}) +sinfo.chart.flow_depth_development.section.title = Flie\u00dftiefenentwicklung +sinfo.chart.flow_depth_development.section.yaxis.label = Flie\u00dftiefenentwicklung [cm] +sinfo.chart.flow_depth.development.yaxis.label = Flie\u00dftiefenentwicklung [cm] + +sinfo.chart.flow_depth_development_perYear.section.title = Flie\u00dftiefenentwicklung pro Jahr +sinfo.chart.flow_depth_development_per_year.section.yaxis.label = Flie\u00dftiefenentwicklung pro Jahr [cm/a] +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.filtered = \u0394h [cm] +sinfo.facet.flow_depth_development.filtered.description = \u0394h ({0}) + +sinfo_facet_waterlevel_difference.filtered = \u0394WSPL [cm] +sinfo.facet.waterlevel_difference.filtered.description = \u0394WSPL ({0}) + +sinfo_facet_bedheight_difference.filtered = \u0394WSPL [cm] +sinfo.facet.bedheight_difference.filtered.description = \u0394MSH ({0}) + +sinfo_facet_flow_depth_current.filtered = h-aktuell [m] +sinfo.facet.flow_depth_current.filtered.description = h-aktuell ({0}) + +sinfo_facet_flow_depth_historical.filtered = h-historisch [m] +sinfo.facet.flow_depth_historical.filtered.description = h-historisch ({0}) + sinfo.flowdepthminmaxcalculation.soundingyear.different = Die Peiljahre von Talweg und Kammlage untersheiden sich sinfo.export.flow_depth_minmax.csv.header.min = Minimale Flie\u00dftiefe diff -r 798d9dcbccdd -r ee5ce13016ed artifacts/src/main/resources/messages_de.properties --- a/artifacts/src/main/resources/messages_de.properties Mon Mar 19 16:32:42 2018 +0100 +++ b/artifacts/src/main/resources/messages_de.properties Tue Mar 20 13:30:07 2018 +0100 @@ -815,7 +815,10 @@ help.state.sinfo.use_transport_bodies=${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies state.sinfo.flow_depth_minmax = minimale/maximale Flie\u00dftiefen -help.state.sinfo.use_transport_bodies = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies +help.state.sinfo.flow_depth_minmax = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flow_depth_minmax + +state.sinfo.flow_depth_development = Flie\u00dftiefenentwicklung +help.state.sinfo.flow_depth_development = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flow_depth_development useTransportBodies.option = Transportk\u00f6rperh\u00f6hen miteinbeziehen? useTransportBodies.active = Aktiv @@ -873,11 +876,11 @@ sinfo.chart.flow_depth.section.yaxis.label=Flie\u00dftiefe [m] sinfo.facet.flow_depth.filtered.description = h ({0}) sinfo.facet.flow_depth_with_tkh.filtered.description = h + \u0394d ({0}) - + 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_max.filtered.description = h-max ({0}) - + sinfo.chart.tkh.section.title=Transportk\u00f6rperh\u00f6hen sinfo.chart.tkh.section.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm] sinfo.chart.tkh.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm] @@ -901,6 +904,31 @@ sinfo.chart.tkh_d50.yaxis.label = Sohlbeschaffenheit D50 [mm] sinfo.facet.tkh_d50.filtered.description = Sohlbeschaffenheit D50 ({0}) +sinfo.chart.flow_depth_development.section.title = Flie\u00dftiefenentwicklung +sinfo.chart.flow_depth_development.section.yaxis.label = Flie\u00dftiefenentwicklung [cm] +sinfo.chart.flow_depth_development.yaxis.label = Flie\u00dftiefenentwicklung [cm] + +sinfo.chart.flow_depth_development_perYear.section.title = Flie\u00dftiefenentwicklung pro Jahr +sinfo.chart.flow_depth_development_per_year.section.yaxis.label = Flie\u00dftiefenentwicklung pro Jahr [cm/a] +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.filtered = \u0394h [cm] +sinfo.facet.flow_depth_development.filtered.description = \u0394h ({0}) + +sinfo_facet_waterlevel_difference.filtered = \u0394WSPL [cm] +sinfo.facet.waterlevel_difference.filtered.description = \u0394WSPL ({0}) + +sinfo_facet_bedheight_difference.filtered = \u0394WSPL [cm] +sinfo.facet.bedheight_difference.filtered.description = \u0394MSH ({0}) + +sinfo_facet_flow_depth_current.filtered = h-aktuell [m] +sinfo.facet.flow_depth_current.filtered.description = h-aktuell ({0}) + +sinfo_facet_flow_depth_historical.filtered = h-historisch [m] +sinfo.facet.flow_depth_historical.filtered.description = h-historisch ({0}) + sinfo.flowdepthminmaxcalculation.soundingyear.different = Die Peiljahre von Talweg und Kammlage untersheiden sich sinfo.export.flow_depth_minmax.csv.header.min = Minimale Flie\u00dftiefe diff -r 798d9dcbccdd -r ee5ce13016ed gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Mon Mar 19 16:32:42 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Tue Mar 20 13:30:07 2018 +0100 @@ -1440,6 +1440,20 @@ String sinfo_flow_depth_minmax(); + String sinfo_flow_depth_developments(); + + String sinfo_flow_depth_development(); + + String sinfo_flow_depth_development_peryear(); + + String sinfo_waterlevel_differences(); + + String sinfo_waterlevel_difference(); + + String sinfo_bedheight_differences(); + + String sinfo_bedheight_difference(); + String sinfo_tkh_export(); String sinfo_tkh_report(); diff -r 798d9dcbccdd -r ee5ce13016ed gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Mon Mar 19 16:32:42 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Tue Mar 20 13:30:07 2018 +0100 @@ -764,6 +764,13 @@ sinfo_flow_depths = Flie\u00dftiefen sinfo_flow_depths_minmax = Min./max. Flie\u00dftiefen sinfo_flow_depth_minmax = Min./max. Flie\u00dftiefen +sinfo_flow_depth_developments = Flie\u00dftiefenentwicklung +sinfo_flow_depth_development = Flie\u00dftiefenentwicklung +sinfo_flow_depth_development_peryear = Flie\u00dftiefenentwicklung pro Jahr +sinfo_waterlevel_differences = Differenzen +sinfo_waterlevel_difference = Differenzen +sinfo_bedheight_differences = Sohlh\u00f6hendifferenzen +sinfo_bedheight_difference = Sohlh\u00f6hendifferenzen sinfo_tkh_export = Transportk\u00f6rperh\u00f6hen Export sinfo_tkh_report = Transportk\u00f6rperh\u00f6hen Bericht sinfo_tkhs = Transportk\u00f6rperh\u00f6hen diff -r 798d9dcbccdd -r ee5ce13016ed gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Mon Mar 19 16:32:42 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Tue Mar 20 13:30:07 2018 +0100 @@ -764,7 +764,13 @@ sinfo_flow_depths = Flie\u00dftiefen sinfo_flow_depths_minmax = Min./max. Flie\u00dftiefen sinfo_flow_depth_minmax = Min./max. Flie\u00dftiefen - +sinfo_flow_depth_developments = Flie\u00dftiefenentwicklung +sinfo_flow_depth_development = Flie\u00dftiefenentwicklung +sinfo_flow_depth_development_peryear = Flie\u00dftiefenentwicklung pro Jahr +sinfo_waterlevel_differences = Differenzen +sinfo_waterlevel_difference = Differenzen +sinfo_bedheight_differences = Sohlh\u00f6hendifferenzen +sinfo_bedheight_difference = Sohlh\u00f6hendifferenzen sinfo_tkh_export = Transportk\u00f6rperh\u00f6hen Export sinfo_tkh_report = Transportk\u00f6rperh\u00f6hen Bericht sinfo_tkhs = Transportk\u00f6rperh\u00f6hen