[PATCH] bundu bezugswst länge der abflusszeitreihe fix + klasse vergessen

Wald Commits scm-commit at wald.intevation.org
Thu Aug 16 15:47:15 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1534427230 -7200
# Node ID 096f151a0a9fb5653fe2db38a1d7e16345f46e9f
# Parent  b534a4f4e4f6e8011f5de04112f1f4c0c1e2cfca
bundu bezugswst länge der abflusszeitreihe fix + klasse vergessen

diff -r b534a4f4e4f6 -r 096f151a0a9f 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	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Thu Aug 16 15:47:10 2018 +0200
@@ -1613,4 +1613,5 @@
 
     String bundu_ws_wq_info();
 
+    String error_invalid_integer_positive_required();
 }
\ No newline at end of file
diff -r b534a4f4e4f6 -r 096f151a0a9f 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	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Thu Aug 16 15:47:10 2018 +0200
@@ -328,6 +328,7 @@
 ele_window_save_error = Error while saving elevations.
 ele_window_geometry_error = The geometry is not supported:
 
+error_invalid_integer_positive_required = Nur Ganzzahlen gr\u00f6\u00dfer 0 erlaubt.
 error_invalid_integer = Nur Ganzzahlen erlaubt.
 error_invalid_double = Nur Zahlen erlaubt.
 error_limit_exceeded_salix = Die Eingabe ist auf 5 Werte beschr\u00e4nkt.
diff -r b534a4f4e4f6 -r 096f151a0a9f 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	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Thu Aug 16 15:47:10 2018 +0200
@@ -328,6 +328,7 @@
 ele_window_save_error = Fehler beim Speichern der H\u00f6hen.
 ele_window_geometry_error = Die Geometrie wird nicht unterst\u00fctzt:
 
+error_invalid_integer_positive_required = Nur Ganzzahlen gr\u00f6\u00dfer 0 erlaubt.
 error_invalid_integer = Nur Ganzzahlen erlaubt.
 error_invalid_double = Nur Zahlen erlaubt.
 error_limit_exceeded_salix = Die Eingabe ist auf 5 Werte beschr\u00e4nkt.
diff -r b534a4f4e4f6 -r 096f151a0a9f gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Thu Aug 16 15:47:10 2018 +0200
@@ -388,7 +388,7 @@
             final DataList[] data = adescr.getOldData();
 
             final String river = getRiverName(data);
-            final int startYear = this.bezugsjahr - this.qSeriesLength;
+            final int startYear = this.bezugsjahr - this.qSeriesLength + 1;
             final int endYear = this.bezugsjahr;
 
             // Gauge ranges overlap, move start and end a bit closer
diff -r b534a4f4e4f6 -r 096f151a0a9f gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java	Thu Aug 16 15:47:10 2018 +0200
@@ -131,7 +131,10 @@
         final List<String> errors = new ArrayList<String>();
         errors.addAll(ValidationHelper.checkForEmpty(this.inputItem, this.MSG));
         try {
-            Integer.valueOf(this.inputItem.getValueAsString());
+            final int value = Integer.valueOf(this.inputItem.getValueAsString());
+            if (value <= 0) {
+                errors.add(this.MSG.error_invalid_integer_positive_required());
+            }
         }
         catch (final NumberFormatException e) {
             errors.add(this.MSG.error_invalid_integer());
diff -r b534a4f4e4f6 -r 096f151a0a9f gwt-client/src/main/java/org/dive4elements/river/client/shared/model/GaugeInfoObject.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/GaugeInfoObject.java	Thu Aug 16 15:47:10 2018 +0200
@@ -0,0 +1,54 @@
+/** 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.client.shared.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class GaugeInfoObject implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String errorMsg;
+    private Date startdate;
+    private Date enddate; // no final, because Serializable demands for empty constructor and I don't want to set default values
+
+    public GaugeInfoObject() {
+
+    }
+
+    public GaugeInfoObject(final String name, final String errorMsg, final Date startdate, final Date enddate) {
+        this.name = name;
+        this.errorMsg = errorMsg;
+        this.startdate = startdate;
+        this.enddate = enddate;
+    }
+
+    public Date getStartdate() {
+        return this.startdate;
+    }
+
+    public Date getEnddate() {
+        return this.enddate;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public String getErrorMsg() {
+        return this.errorMsg;
+    }
+}


More information about the Dive4Elements-commits mailing list