# HG changeset patch # User gernotbelger # Date 1537886631 -7200 # Node ID bb278c927b6626f96354c1f91b9ed0160631de20 # Parent 879c902c4a2d2115eb92b5ed76297cace5f380e2 Datenkorb bezugswasserstände längsschnitte + minor fixes diff -r 879c902c4a2d -r bb278c927b66 artifacts/doc/conf/meta-data.xml --- a/artifacts/doc/conf/meta-data.xml Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/doc/conf/meta-data.xml Tue Sep 25 16:43:51 2018 +0200 @@ -142,10 +142,10 @@ - + + @@ -328,13 +328,13 @@ - + + @@ -348,8 +348,8 @@ - - + + @@ -465,6 +465,8 @@ + + Discharge curves @@ -1718,6 +1720,7 @@ + @@ -1742,9 +1745,12 @@ - + UINFO + + BUNDU + @@ -3527,7 +3533,7 @@ - + @@ -3775,5 +3781,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java Tue Sep 25 16:43:51 2018 +0200 @@ -86,7 +86,8 @@ this.missKmFrom = access.getMissingVolFrom(); this.missKmTo = access.getMissingVolTo(); - final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange()); + final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange(), + access.isCalculateMissingVolume()); final Calculation problems = new Calculation(); @@ -117,7 +118,7 @@ } // Compute the missing volumes - if (access.isCalculateMissingValue()) { + if (access.isCalculateMissingVolume()) { if ((bedHeightsFinder == null) || bedHeightsFinder.isNull()) return new CalculationResult(results, problems); computeMissingVolumes(problems); diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java Tue Sep 25 16:43:51 2018 +0200 @@ -22,8 +22,16 @@ private static final long serialVersionUID = 1L; - public BezugswstCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { + private final boolean hasSounding; + + public BezugswstCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange, + final boolean hasSounding) { super(calcModeLabel, user, river, calcRange); + this.hasSounding = hasSounding; + } + + public boolean hasSounding() { + return this.hasSounding; } } \ No newline at end of file diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstFixationFacet.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstFixationFacet.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstFixationFacet.java Tue Sep 25 16:43:51 2018 +0200 @@ -11,6 +11,7 @@ import java.util.List; +import org.dive4elements.artifactdatabase.state.Facet; import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult; import org.dive4elements.river.artifacts.model.CalculationResult; import org.dive4elements.river.artifacts.model.WQKms; @@ -19,6 +20,8 @@ public class BezugswstFixationFacet extends FixWaterlevelFacet { + private static final long serialVersionUID = 1L; + public BezugswstFixationFacet() { } @@ -39,4 +42,14 @@ return null; } + /** Copy deeply. */ + @Override + public Facet deepCopy() { + final BezugswstFixationFacet copy = new BezugswstFixationFacet(); + copy.set(this); + copy.type = this.type; + copy.hash = this.hash; + copy.stateId = this.stateId; + return copy; + } } diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java Tue Sep 25 16:43:51 2018 +0200 @@ -89,19 +89,26 @@ if (!resultList.isEmpty()) { final BezugswstMainCalculationResult result = (BezugswstMainCalculationResult) resultList.get(0); - facets.add(BezugswstHeightProcessor.createChannelminFacet(context, hash, this.id, facetIndex++, 0)); - facets.add(BezugswstHeightProcessor.createBedheightFacet(context, hash, this.id, facetIndex++, 0, result.getBedHeightLabel())); + + final boolean hasSounding = results.hasSounding(); + final String nameQ = result.getWstLabel(); final String nameW = "W(" + nameQ + ")"; facets.add(new BezugswstFixationFacet(0, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, hash, this.id)); facets.add(new BezugswstFixationFacet(0, LONGITUDINAL_Q, nameQ, ComputeType.ADVANCE, hash, this.id)); - for (int i = BedHeightValueType.FIELD_FIRST_INDEX; i <= BedHeightValueType.FIELD_LAST_INDEX; i++) - facets.add(BezugswstHeightProcessor.createFieldBedheightFacet(context, hash, this.id, facetIndex++, 0, i)); - facets.add(BezugswstDepthProcessor.createFlowdepthFilteredFacet(context, hash, this.id, facetIndex++, 0, result.getBedHeightLabel())); - facets.add(BezugswstDepthProcessor.createChanneldepthFacet(context, hash, this.id, facetIndex++, 0)); - for (int i = BedHeightValueType.FIELD_FIRST_INDEX; i <= BedHeightValueType.FIELD_LAST_INDEX; i++) - facets.add(BezugswstDepthProcessor.createFieldDepthFacet(context, hash, this.id, facetIndex++, 0, i)); + if (hasSounding) { + facets.add(BezugswstHeightProcessor.createChannelminFacet(context, hash, this.id, facetIndex++, 0)); + facets.add(BezugswstHeightProcessor.createBedheightFacet(context, hash, this.id, facetIndex++, 0, result.getBedHeightLabel())); + + for (int i = BedHeightValueType.FIELD_FIRST_INDEX; i <= BedHeightValueType.FIELD_LAST_INDEX; i++) + facets.add(BezugswstHeightProcessor.createFieldBedheightFacet(context, hash, this.id, facetIndex++, 0, i)); + + facets.add(BezugswstDepthProcessor.createFlowdepthFilteredFacet(context, hash, this.id, facetIndex++, 0, result.getBedHeightLabel())); + facets.add(BezugswstDepthProcessor.createChanneldepthFacet(context, hash, this.id, facetIndex++, 0)); + for (int i = BedHeightValueType.FIELD_FIRST_INDEX; i <= BedHeightValueType.FIELD_LAST_INDEX; i++) + facets.add(BezugswstDepthProcessor.createFieldDepthFacet(context, hash, this.id, facetIndex++, 0, i)); + } final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java Tue Sep 25 16:43:51 2018 +0200 @@ -72,20 +72,20 @@ } public Double getMissingVolFrom() { - if (isCalculateMissingValue()) + if (isCalculateMissingVolume()) return getDouble("ld_from_part"); else return null; } public Double getMissingVolTo() { - if (isCalculateMissingValue()) + if (isCalculateMissingVolume()) return getDouble("ld_to_part"); else return null; } - public boolean isCalculateMissingValue() { + public boolean isCalculateMissingVolume() { return getBoolean("missing_volume"); } @@ -93,7 +93,7 @@ final String data = getString("soundings"); - if (data == null || !isCalculateMissingValue()) { + if (data == null || !isCalculateMissingVolume()) { log.warn("No 'soundings' parameter specified!"); return null; } else { diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWaterlevelFacet.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWaterlevelFacet.java Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWaterlevelFacet.java Tue Sep 25 16:43:51 2018 +0200 @@ -9,51 +9,44 @@ package org.dive4elements.river.artifacts.model.fixings; import org.dive4elements.artifactdatabase.state.Facet; - import org.dive4elements.river.artifacts.model.CalculationResult; import org.dive4elements.river.artifacts.model.WQKms; +import org.dive4elements.river.artifacts.model.WQKmsResult; import org.dive4elements.river.artifacts.model.WaterlevelFacet; - import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; /** Waterlevel from fix realize compute. */ -public class FixWaterlevelFacet -extends WaterlevelFacet -{ +public class FixWaterlevelFacet extends WaterlevelFacet { public FixWaterlevelFacet() { } - public FixWaterlevelFacet(int index, String name, String description) { + public FixWaterlevelFacet(final int index, final String name, final String description) { super(index, name, description, ComputeType.ADVANCE, null, null); } - public FixWaterlevelFacet( - int index, - String name, - String description, - ComputeType type, - String hash, - String stateID - ) { + public FixWaterlevelFacet(final int index, final String name, final String description, final ComputeType type, final String hash, final String stateID) { // Note that in super, hash and stateID are on switched positions. // on super.super it is this way around again. super(index, name, description, type, stateID, hash); } @Override - protected WQKms [] getWQKms(CalculationResult res) { - FixRealizingResult fr = (FixRealizingResult)res.getData(); - return fr != null ? fr.getWQKms() : null; + protected WQKms[] getWQKms(final CalculationResult res) { + if (res.getData() instanceof WQKmsResult) { + final WQKmsResult fr = (WQKmsResult) res.getData(); + return fr != null ? fr.getWQKms() : null; + } + return null; } /** Copy deeply. */ @Override public Facet deepCopy() { - FixWaterlevelFacet copy = new FixWaterlevelFacet(); + final FixWaterlevelFacet copy = new FixWaterlevelFacet(); copy.set(this); - copy.type = type; - copy.hash = hash; - copy.stateId = stateId; + copy.type = this.type; + copy.hash = this.hash; + copy.stateId = this.stateId; return copy; } } diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/resources/messages.properties --- a/artifacts/src/main/resources/messages.properties Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/resources/messages.properties Tue Sep 25 16:43:51 2018 +0200 @@ -1324,13 +1324,13 @@ bundu.wst.gauge_no_ud_calc_available = No calculation of DNE available. bundu.chart.wspl.section.title = REFWL-Longitudinal Section -bundu_facet_bedheight.description = Mean Bed Height ({0}) +bundu_facet_bedheight.description = Mean Bed Height ({0}) bundu_facet_channelmin.description = Bed (Target) -bundu_facet_field_bedheight.description = Bed Height Field {0} +bundu_facet_field_bedheight.description = Bed Height Field {0} bundu.chart.depth.section.title = \u0394h-L\u00e4ngsschnitt bundu_facet_flowdepth.filtered.description = \u0394h (BZWS, {0}) bundu_facet_channeldepth.description = \u0394h (Target depth) -bundu_facet_field_depth.description = \u0394h Field {0} +bundu_facet_field_depth.description = \u0394h Field {0} bundu.channelfinder.empty = The database does not contain any values for the river and the reference year bundu.channelfinder.missing = no channel data available diff -r 879c902c4a2d -r bb278c927b66 artifacts/src/main/resources/messages_de.properties --- a/artifacts/src/main/resources/messages_de.properties Mon Sep 24 18:01:10 2018 +0200 +++ b/artifacts/src/main/resources/messages_de.properties Tue Sep 25 16:43:51 2018 +0200 @@ -1324,13 +1324,13 @@ bundu.wst.gauge_no_ud_calc_available = Eine Berechnung der UD ist nicht m\u00f6glich. bundu.chart.wspl.section.title = BZWS-L\u00e4ngsschnitt -bundu_facet_bedheight.description = Mittlere Sohlh\u00f6he ({0}) +bundu_facet_bedheight.description = Mittlere Sohlh\u00f6he ({0}) bundu_facet_channelmin.description = Sohle (Sollzustand) -bundu_facet_field_bedheight.description = Sohlh\u00f6he Feld {0} +bundu_facet_field_bedheight.description = Sohlh\u00f6he Feld {0} bundu.chart.depth.section.title = \u0394h-L\u00e4ngsschnitt bundu_facet_flowdepth.filtered.description = \u0394h (BZWS, {0}) bundu_facet_channeldepth.description = \u0394h (Solltiefe) -bundu_facet_field_depth.description = \u0394h Feld {0} +bundu_facet_field_depth.description = \u0394h Feld {0} bundu.channelfinder.empty = Die Datenbank enth\u00e4lt keine Fahrrinnedaten f\u00fcr das Gew\u00e4sser und das Bezugsjahr bundu.channelfinder.missing = keine Fahrrinnedaten vorhanden diff -r 879c902c4a2d -r bb278c927b66 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 Sep 24 18:01:10 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Tue Sep 25 16:43:51 2018 +0200 @@ -1616,4 +1616,6 @@ String gauge_list_grid_end(); String no_data_for_input(); + + String bundu_bezugswsts(); } \ No newline at end of file diff -r 879c902c4a2d -r bb278c927b66 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 Sep 24 18:01:10 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Tue Sep 25 16:43:51 2018 +0200 @@ -858,6 +858,7 @@ bundu_ws_wq_info = The discharge values MNQ, MQ and MHQ are being calculated based on the daily discharge values. bundu_wspl_longitudinal_section = REFWL - Longitudinal Section bundu_depth_longitudinal_section = REFWL \u0394h - +bundu_bezugswsts = Reference Waterlevels chart_settings_export_metadata = Show Metadata export_csv_title = Title: diff -r 879c902c4a2d -r bb278c927b66 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 Sep 24 18:01:10 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Tue Sep 25 16:43:51 2018 +0200 @@ -858,6 +858,7 @@ bundu_ws_wq_info = Die Abfl\u00fcsse MNQ, MQ und MHQ sind anhand der Tagesmittelwerte des Abflusses berechnet. bundu_wspl_longitudinal_section = BZWS - L\u00e4ngsschnitt bundu_depth_longitudinal_section = BZWS \u0394h - L\u00e4ngsschnitt +bundu_bezugswsts = Bezugswasserst\u00e4nde chart_settings_export_metadata = Metadaten anzeigen export_csv_title = Titel: