# HG changeset patch
# User gernotbelger
# Date 1525104182 -7200
# Node ID c265c9fc915c55bb34fb4ed490ed837c2489b40f
# Parent 8aa7d9eaaa218b85dbed2b8b9d4775ef0da94332
work on u-info/s-info states
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/doc/conf/artifacts/sinfo.xml
--- a/artifacts/doc/conf/artifacts/sinfo.xml Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml Mon Apr 30 18:03:02 2018 +0200
@@ -213,6 +213,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/doc/conf/artifacts/uinfo.xml
--- a/artifacts/doc/conf/artifacts/uinfo.xml Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/doc/conf/artifacts/uinfo.xml Mon Apr 30 18:03:02 2018 +0200
@@ -21,20 +21,54 @@
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -80,7 +121,7 @@
-
+
-
+
=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.artifacts.sinfo.inundation;
+
+import org.dive4elements.river.artifacts.states.BooleanChoiceState;
+
+/**
+ * @author Ingo Weinzierl
+ */
+public class WsplChoice extends BooleanChoiceState {
+
+ private static final long serialVersionUID = 1L;
+
+ public WsplChoice() {
+ super("wspl.option", "wspl.active", "wspl.inactive");
+ }
+}
\ No newline at end of file
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/CalculationSelectUinfo.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/CalculationSelectUinfo.java Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/CalculationSelectUinfo.java Mon Apr 30 18:03:02 2018 +0200
@@ -53,9 +53,9 @@
public boolean validate(final Artifact artifact) throws IllegalArgumentException {
log.debug("CalculationSelect.validate");
- final UINFOArtifact sinfo = (UINFOArtifact) artifact;
+ final UINFOArtifact uinfo = (UINFOArtifact) artifact;
/* throws an exception if calculation mode is invalid */
- sinfo.getCalculationMode();
+ uinfo.getCalculationMode();
return true;
}
}
\ No newline at end of file
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java Mon Apr 30 18:03:02 2018 +0200
@@ -10,78 +10,72 @@
package org.dive4elements.river.artifacts.uinfo;
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;
/**
- * The default SINFO artifact.
+ * The default UINFO artifact.
*
* @author Gernot Belger
*/
public class UINFOArtifact 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 = "uinfo";
-
- 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, new FacetActivity() {
- @Override
- public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) {
- return null;
- }
- });
- }
+ private static final long serialVersionUID = 1L;
- /**
- * Default constructor, because it's serializable.
- */
- public UINFOArtifact() {
- }
-
- /**
- * Returns the name of the concrete artifact.
- *
- * @return the name of the concrete artifact.
- */
- @Override
- public String getName() {
- return ARTIFACT_NAME;
- }
+ /** Error message that is thrown if no mode has been chosen. */
+ private static final String ERROR_NO_CALCULATION_MODE = "error_feed_no_calculation_mode";
- public UinfoCalcMode getCalculationMode() {
-
- final String calc = getDataAsString(FIELD_MODE);
- if (calc == null) {
- throw new IllegalArgumentException(ERROR_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";
- try {
- return UinfoCalcMode.valueOf(StringUtils.trimToEmpty(calc).toLowerCase());
- } catch (final Exception e) {
- throw new IllegalArgumentException(ERROR_INVALID_CALCULATION_MODE, e);
- }
- }
+ /** The name of the artifact. */
+ private static final String ARTIFACT_NAME = "uinfo";
- public String getRiver() {
- return getDataAsString(FIELD_RIVER);
- }
+ 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 UINFOArtifact() {
+ }
+
+ /**
+ * Returns the name of the concrete artifact.
+ *
+ * @return the name of the concrete artifact.
+ */
+ @Override
+ public String getName() {
+ return ARTIFACT_NAME;
+ }
+
+ public UinfoCalcMode getCalculationMode() {
+
+ final String calc = getDataAsString(FIELD_MODE);
+ if (calc == null) {
+ throw new IllegalArgumentException(ERROR_NO_CALCULATION_MODE);
+ }
+
+ try {
+ return UinfoCalcMode.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 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java Mon Apr 30 18:03:02 2018 +0200
@@ -0,0 +1,17 @@
+
+package org.dive4elements.river.artifacts.uinfo.salix;
+
+import org.dive4elements.river.artifacts.states.BooleanChoiceState;
+
+/**
+ * @author Ingo Weinzierl
+ */
+public class ScenarioTypeState extends BooleanChoiceState {
+
+ private static final long serialVersionUID = 1L;
+
+ public ScenarioTypeState() {
+ super("activeMsg1", "activeMsg2", "activeMsg3"); // kriege den state irgendwie nicht selbst hin
+ }
+
+}
\ No newline at end of file
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/UseScenarioChoice.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/UseScenarioChoice.java Mon Apr 30 18:03:02 2018 +0200
@@ -0,0 +1,23 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * 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.salix;
+
+import org.dive4elements.river.artifacts.states.BooleanChoiceState;
+
+/**
+ * @author Ingo Weinzierl
+ */
+public class UseScenarioChoice extends BooleanChoiceState {
+
+ private static final long serialVersionUID = 1L;
+
+ public UseScenarioChoice() {
+ super("useScenario.option", "useScenario.active", "useScenario.inactive");
+ }
+}
\ No newline at end of file
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties Mon Apr 30 18:03:02 2018 +0200
@@ -833,6 +833,10 @@
state.sinfo.flowdepthdevlopment_historical_select = Historisches Differenzenpaar
help.state.sinfo.flowdepthdevlopment_historical_select = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flowdepthdevlopment_historical_select
+state.sinfo.wspl = Wasserspiegellagen
+state.sinfo.wspl.option = Wasserspiegellagen zus\u00e4tzlich darstellen?
+help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wspl
+
sinfo.export.flow_depth.csv.meta.header.result = ## {0} - {1} - {2}
sinfo.export.flow_depth.csv.meta.header.result.label = Calculation Output
sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
@@ -985,6 +989,22 @@
flowdepthdevelopmentcalculation.yearDifferenceCurrent = aktuelles Differenzenpaar
flowdepthdevelopmentcalculation.yearDifferenceHistorical = = historisches Differenzenpaar
+state.uinfo.use_scenario=Szenariobetrachtung
+useScenario.option = Zus\u00e4tzlich Szenariobetrachtung miteinbeziehen?
+useScenario.active = Activ
+useScenario.inactive = Inactiv
+help.state.uinfo.use_scenario=${help.url}/OnlineHilfe/UINFO#help.state.uinfo.use_scenario
+
+
+state.uinfo.scenario_type=Auswahl des Szenariotyps
+scenarioType.option1 = Regional wirkende Eingriffe
+scenarioType.option2 = \u00dcberregional wirkende Eingriffe
+scenarioType.option1 = Historische Betrachtung
+help.state.uinfo.scenario_type=${help.url}/OnlineHilfe/UINFO#help.state.uinfo.scenario_type
+
+state.uinfo.distance_only = Range selection
+help.state.uinfo.distance_only = ${help.url}/OnlineHilfe/UINFO#help.state.uinfo.distance_only
+
uinfo_salix_line = Salix-Linie
uinfo_inundation_duration = \u00dcberflutungsdauern Aue
uinfo_vegetation_zones = Vegetationszonen
diff -r 8aa7d9eaaa21 -r c265c9fc915c artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Mon Apr 30 18:03:02 2018 +0200
@@ -833,6 +833,10 @@
state.sinfo.flowdepthdevlopment_historical_select = Historisches Differenzenpaar
help.state.sinfo.flowdepthdevlopment_historical_select = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.flowdepthdevlopment_historical_select
+state.sinfo.wspl = Wasserspiegellagen
+state.sinfo.wspl.option = Wasserspiegellagen zus\u00e4tzlich darstellen?
+help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wspl
+
sinfo.export.flow_depth.csv.meta.header.result = ##{0} - {1} - {2}
sinfo.export.flow_depth.csv.meta.header.result.label = Ergebnisausgabe
sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
@@ -985,6 +989,16 @@
flowdepthdevelopmentcalculation.yearDifferenceCurrent = aktuelles Differenzenpaar
flowdepthdevelopmentcalculation.yearDifferenceHistorical = = historisches Differenzenpaar
+state.uinfo.use_scenario=Szenariobetrachtung
+useScenario.option = Zus\u00e4tzlich Szenariobetrachtung miteinbeziehen?
+useScenario.active = Ja
+useScenario.inactive = Nein
+help.state.uinfo.use_scenario=${help.url}/OnlineHilfe/UINFO#help.state.uinfo.use_scenario
+
+state.uinfo.distance_only = Wahl der Berechnungsstrecke
+help.state.uinfo.distance_only = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.distance_only
+
+
uinfo_salix_line = Salix-Linie
uinfo_inundation_duration = \u00dcberflutungsdauern Aue
uinfo_vegetation_zones = Vegetationszonen
diff -r 8aa7d9eaaa21 -r c265c9fc915c 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 Apr 30 10:13:15 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Mon Apr 30 18:03:02 2018 +0200
@@ -14,7 +14,7 @@
projectlist_creationTime = Anlegezeitpunkt
projectlist_title = Titel
projectlist_favorite = Dauerhaft
-projectlist_close = Schlie\u1e9een
+projectlist_close = Schlie\u00dfen
really_delete = Wollen Sie dieses Projekt wirklich l\u00f6schen?
project_name_too_long = Der eingegebene Projektname ist zu lang. Die maximale L\u00e4nge betr\u00e4gt $LEN Zeichen.
switch_language = Englisch