# HG changeset patch
# User gernotbelger
# Date 1526461736 -7200
# Node ID a561b882436d4cb8054ca36ec113c54f4229c2f3
# Parent 611a523fc42fdabcb45c51dd03d61c041197515b
create module bundu (Betrieb & Unterhaltung)
incl. original Fixierungsanalyse+Ausgelagerte Wasserspiegellage
diff -r 611a523fc42f -r a561b882436d artifacts/doc/conf/artifacts/bundu.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/artifacts/bundu.xml Wed May 16 11:08:56 2018 +0200
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 611a523fc42f -r a561b882436d artifacts/doc/conf/conf.xml
--- a/artifacts/doc/conf/conf.xml Tue May 15 18:04:36 2018 +0200
+++ b/artifacts/doc/conf/conf.xml Wed May 16 11:08:56 2018 +0200
@@ -24,7 +24,8 @@
-
+
+
]>
YOUR_SECRET
@@ -181,9 +182,10 @@
ttl="3600000"
artifact="org.dive4elements.river.artifacts.uinfo.UINFOArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory
-
+ org.dive4elements.artifactdatabase.DefaultArtifactFactory
+ artifact="org.dive4elements.river.artifacts.bundu.BUNDUArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory
&modules;
diff -r 611a523fc42f -r a561b882436d artifacts/doc/conf/modules.xml
--- a/artifacts/doc/conf/modules.xml Tue May 15 18:04:36 2018 +0200
+++ b/artifacts/doc/conf/modules.xml Wed May 16 11:08:56 2018 +0200
@@ -1,24 +1,27 @@
-
+
-
-
+ ^
+
-
+
-
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BUNDUArtifact.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BUNDUArtifact.java Wed May 16 11:08:56 2018 +0200
@@ -0,0 +1,81 @@
+/* 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.bundu;
+
+import org.apache.commons.lang.StringUtils;
+import org.dive4elements.artifactdatabase.state.FacetActivity;
+import org.dive4elements.river.artifacts.D4EArtifact;
+
+/**
+ * The default BUNDU artifact.
+ *
+ * @author Gernot Belger
+ */
+public class BUNDUArtifact extends D4EArtifact {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Error message that is thrown if no mode has been chosen. */
+ private static final String ERROR_NO_CALCULATION_MODE = "error_feed_no_calculation_mode";
+
+ /**
+ * Error message that is thrown if an invalid calculation mode has been chosen.
+ */
+ private static final String ERROR_INVALID_CALCULATION_MODE = "error_feed_invalid_calculation_mode";
+
+ /** The name of the artifact. */
+ private static final String ARTIFACT_NAME = "bundu";
+
+ private static final String FIELD_RIVER = "river";
+
+ 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(ARTIFACT_NAME, (artifact, facet, output) -> null);
+ }
+
+ /**
+ * Default constructor, because it's serializable.
+ */
+ public BUNDUArtifact() {
+ }
+
+ /**
+ * Returns the name of the concrete artifact.
+ *
+ * @return the name of the concrete artifact.
+ */
+ @Override
+ public String getName() {
+ return ARTIFACT_NAME;
+ }
+
+ public BunduCalcMode getCalculationMode() {
+
+ final String calc = getDataAsString(FIELD_MODE);
+ if (calc == null) {
+ throw new IllegalArgumentException(ERROR_NO_CALCULATION_MODE);
+ }
+
+ try {
+ return BunduCalcMode.valueOf(StringUtils.trimToEmpty(calc).toLowerCase());
+ }
+ catch (final Exception e) {
+ throw new IllegalArgumentException(ERROR_INVALID_CALCULATION_MODE, e);
+ }
+ }
+
+ public String getRiver() {
+ return getDataAsString(FIELD_RIVER);
+ }
+}
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduCalcMode.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduCalcMode.java Wed May 16 11:08:56 2018 +0200
@@ -0,0 +1,15 @@
+/* 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.bundu;
+
+public enum BunduCalcMode {
+ bundu_bezugswst
+}
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZoneAccessHelper.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZoneAccessHelper.java Wed May 16 11:08:56 2018 +0200
@@ -0,0 +1,67 @@
+/** 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.uinfo.vegetationzones;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class VegetationZoneAccessHelper {
+ // IMMER ABGLEICHEN MIT SuperVegZonesTablePanel.TABLE_CELL_SEPARATOR
+ private static final String TABLE_CELL_SEPARATOR = "TABLE_CELL_SEPARATOR";
+ private static final String TABLE_ROW_SEPARATOR = "TABLE_ROW_SEPARATOR";
+ private final String zoneName;
+ private final int min_day_overflow;
+ private final int max_day_overflow;
+
+ public static List parse(final String zonesRaw) {
+ final List resultList = new ArrayList<>();
+
+ final List results = new ArrayList<>();
+ if (zonesRaw.contains(TABLE_ROW_SEPARATOR)) {
+ final String[] rows = zonesRaw.split(TABLE_ROW_SEPARATOR);
+ for (final String row : rows) {
+ if (row.contains(TABLE_CELL_SEPARATOR)) {
+ final String[] result = row.split(TABLE_CELL_SEPARATOR);
+ results.add(result);
+ }
+ }
+ }
+ for (final String[] zone : results) {
+
+ final VegetationZoneAccessHelper helper = new VegetationZoneAccessHelper(zone[0], Integer.valueOf(zone[1]), Integer.valueOf(zone[2]));
+ resultList.add(helper);
+ }
+
+ return resultList;
+ }
+
+ private VegetationZoneAccessHelper(final String zone, final Integer min_day_overflow, final Integer max_day_overflow) {
+ // TODO Auto-generated constructor stub
+ this.zoneName = zone;
+ this.min_day_overflow = min_day_overflow;
+ this.max_day_overflow = max_day_overflow;
+ }
+
+ public int getMax_day_overflow() {
+ return this.max_day_overflow;
+ }
+
+ public String getZoneName() {
+ return this.zoneName;
+ }
+
+ public int getMin_day_overflow() {
+ return this.min_day_overflow;
+ }
+}
diff -r 611a523fc42f -r a561b882436d artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Tue May 15 18:04:36 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties Wed May 16 11:08:56 2018 +0200
@@ -752,6 +752,7 @@
module.fixanalysis = Fix Analysis
module.new_map = New Map
module.new_chart = New Chart
+module.bundu = Betrieb und Unterhaltung
load_diameter = Bedload Diameter
bed_diameter = Bed Diameter
@@ -1078,4 +1079,6 @@
uinfo.export.csv.meta.header.veg.dauerbis = \u00dcberflutungsdauer bis [d/a]
predefineddepthevol.total.title = Gesamt: {0}
-predefineddepthevol.peryear.title = J\u00e4hrlich: {0}
\ No newline at end of file
+predefineddepthevol.peryear.title = J\u00e4hrlich: {0}
+
+bundu_bezugswst = Bezugswasserst\u00e4nde
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Tue May 15 18:04:36 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Wed May 16 11:08:56 2018 +0200
@@ -752,6 +752,7 @@
module.fixanalysis = Fixierungsanalyse
module.new_map = Neue Karte
module.new_chart = Neues Diagramm
+module.bundu = Betrieb und Unterhaltung
load_diameter = Geschiebedurchmesser
bed_diameter = Sohldurchmesser
@@ -1078,4 +1079,6 @@
uinfo.export.csv.meta.header.veg.dauerbis = \u00dcberflutungsdauer bis [d/a]
predefineddepthevol.total.title = Gesamt: {0}
-predefineddepthevol.peryear.title = J\u00e4hrlich: {0}
\ No newline at end of file
+predefineddepthevol.peryear.title = J\u00e4hrlich: {0}
+
+bundu_bezugswst = Bezugswasserst\u00e4nde
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d 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 Tue May 15 18:04:36 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Wed May 16 11:08:56 2018 +0200
@@ -1517,4 +1517,6 @@
String uinfo_vegetation_zones_to();
+ String bundu();
+
}
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d 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 Tue May 15 18:04:36 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Wed May 16 11:08:56 2018 +0200
@@ -811,4 +811,6 @@
uinfo_vegetation_zone_label = Vegetationszone
uinfo_vegetation_zones_label = Vegetationszonen
uinfo_vegetation_zones_from = \u00dcfd von [d/a]
-uinfo_vegetation_zones_to = \u00dcfd bis [d/a]
\ No newline at end of file
+uinfo_vegetation_zones_to = \u00dcfd bis [d/a]
+
+bundu = Betrieb und Unterhaltung
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d 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 Tue May 15 18:04:36 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Wed May 16 11:08:56 2018 +0200
@@ -811,4 +811,6 @@
uinfo_vegetation_zone_label = Vegetationszone
uinfo_vegetation_zones_label = Vegetationszonen
uinfo_vegetation_zones_from = \u00dcfd von [d/a]
-uinfo_vegetation_zones_to = \u00dcfd bis [d/a]
\ No newline at end of file
+uinfo_vegetation_zones_to = \u00dcfd bis [d/a]
+
+bundu = Betrieb und Unterhaltung
\ No newline at end of file
diff -r 611a523fc42f -r a561b882436d gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Tue May 15 18:04:36 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Wed May 16 11:08:56 2018 +0200
@@ -8,20 +8,11 @@
package org.dive4elements.river.client.client.ui;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import com.smartgwt.client.types.Overflow;
-import com.smartgwt.client.types.VerticalAlignment;
-import com.smartgwt.client.types.VisibilityMode;
-import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.layout.HLayout;
-import com.smartgwt.client.widgets.layout.SectionStack;
-import com.smartgwt.client.widgets.layout.SectionStackSection;
-import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.Tab;
-import com.smartgwt.client.widgets.tab.events.TabSelectedHandler;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
import org.dive4elements.river.client.client.Config;
import org.dive4elements.river.client.client.FLYS;
@@ -53,6 +44,7 @@
import org.dive4elements.river.client.client.ui.stationinfo.MeasurementStationPanel;
import org.dive4elements.river.client.shared.model.Artifact;
import org.dive4elements.river.client.shared.model.ArtifactDescription;
+import org.dive4elements.river.client.shared.model.BUNDUArtifact;
import org.dive4elements.river.client.shared.model.Collection;
import org.dive4elements.river.client.shared.model.Data;
import org.dive4elements.river.client.shared.model.DataItem;
@@ -69,19 +61,21 @@
import org.dive4elements.river.client.shared.model.UINFOArtifact;
import org.dive4elements.river.client.shared.model.WINFOArtifact;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.types.VisibilityMode;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.SectionStack;
+import com.smartgwt.client.widgets.layout.SectionStackSection;
+import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
+import com.smartgwt.client.widgets.tab.events.TabSelectedHandler;
-
-public class ParameterList
-extends Tab
-implements StepBackHandler, StepForwardHandler, ParameterChangeHandler,
- HasParameterChangeHandler, CollectionChangeHandler,
- OutputModesChangeHandler, AdvanceHandler
-{
+public class ParameterList extends Tab implements StepBackHandler, StepForwardHandler, ParameterChangeHandler, HasParameterChangeHandler, CollectionChangeHandler, OutputModesChangeHandler, AdvanceHandler {
private static final long serialVersionUID = 5204784727239299980L;
public static final String STYLENAME_OLD_PARAMETERS = "oldParameters";
@@ -90,21 +84,15 @@
protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
/** The ArtifactService used to communicate with the Artifact server. */
- protected ArtifactServiceAsync artifactService =
- GWT.create(ArtifactService.class);
+ protected ArtifactServiceAsync artifactService = GWT.create(ArtifactService.class);
/** The StepForwardService used to put data into an existing artifact. */
- protected StepForwardServiceAsync forwardService =
- GWT.create(StepForwardService.class);
+ protected StepForwardServiceAsync forwardService = GWT.create(StepForwardService.class);
/** The StepForwardService used to put data into an existing artifact. */
- protected AdvanceServiceAsync advanceService =
- GWT.create(AdvanceService.class);
+ protected AdvanceServiceAsync advanceService = GWT.create(AdvanceService.class);
-
- protected ReportServiceAsync reportService =
- GWT.create(ReportService.class);
-
+ protected ReportServiceAsync reportService = GWT.create(ReportService.class);
/** The list of ParameterizationChangeHandler. */
protected List parameterHandlers;
@@ -117,7 +105,7 @@
protected List