changeset 5690:b85df73edef0

merge
author Tom Gottfried <tom.gottfried@intevation.de>
date Fri, 12 Apr 2013 19:52:15 +0200
parents a3f7da9bf0d1 (current diff) 7b6cca32f940 (diff)
children dc2daadbdd0c
files
diffstat 11 files changed, 39 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Apr 12 19:51:44 2013 +0200
+++ b/.hgtags	Fri Apr 12 19:52:15 2013 +0200
@@ -41,3 +41,4 @@
 2fa6da26a1421932608ab8c71ef51f260ad77acd 2.9.16
 3e8f7b4bdf20f2f96edaab593dfaaefe2add46f5 2.9.17
 8128622e4b2893d91a30bdd52f7e426f6098ba0c 2.9.18
+c4162d8378a1333f891b584228c9d00b0e367401 2.9.19
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadCalculation.java	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadCalculation.java	Fri Apr 12 19:52:15 2013 +0200
@@ -256,22 +256,29 @@
 
     private SedimentLoad calculateTotalLoad(SedimentLoad load, int year) {
         logger.debug("calculateTotalLoad");
+        boolean problemThisYear = false;
         if (!load.hasCoarse()) {
-            addProblem(year, "missing.fraction.coarse");
+            addProblem("missing.fraction.coarse", Double.toString(year));
+            problemThisYear = true;
         }
         if (!load.hasFineMiddle()) {
-            addProblem(year, "missing.fraction.fine_middle");
+            addProblem("missing.fraction.fine_middle", Double.toString(year));
+            problemThisYear = true;
         }
         if (!load.hasSand()) {
-            addProblem(year, "missing.fraction.sand");
+            addProblem("missing.fraction.sand", Double.toString(year));
+            problemThisYear = true;
         }
         if (!load.hasSuspSand()) {
-            addProblem(year, "missing.fraction.susp_sand");
+            addProblem("missing.fraction.susp_sand", Double.toString(year));
+            problemThisYear = true;
         }
         if (!load.hasSuspSediment()) {
-            addProblem(year, "missing.fraction.susp_sediment");
+            addProblem("missing.fraction.susp_sediment", Double.toString(year));
+            problemThisYear = true;
         }
-        if (hasProblems()) {
+        if (problemThisYear) {
+            logger.warn("Some problem, not calculating total load.");
             return load;
         }
         for(double km : load.getKms()) {
--- a/flys-artifacts/src/main/resources/messages.properties	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-artifacts/src/main/resources/messages.properties	Fri Apr 12 19:52:15 2013 +0200
@@ -246,11 +246,11 @@
 facet.sedimentload.susp_sediment = Sediment
 facet.sedimentload.total = Total
 facet.sedimentload.total_load = Total bed load
-missing.fraction.coarse = Missing coarse fraction
-missing.fraction.fine_middle = Missing fine/middle fraction
-missing.fraction.sand = Missing sand fraction
-missing.fraction.susp_sand = Missing susp. sand fraction
-missing.fraction.susp_sediment = Missing susp. sediment fraction
+missing.fraction.coarse = Year {0}: Missing coarse fraction
+missing.fraction.fine_middle = Year {0}: Missing fine/middle fraction
+missing.fraction.sand = Year {0}: Missing sand fraction
+missing.fraction.susp_sand = Year {0}: Missing susp. sand fraction
+missing.fraction.susp_sediment = Year {0}: Missing susp. sediment fraction
 missing.data.coarse = Missing coarse data at
 missing.data.fine_middle = Missing fine/middle data at
 missing.data.sand = Missing sand data at
--- a/flys-artifacts/src/main/resources/messages_de.properties	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Fri Apr 12 19:52:15 2013 +0200
@@ -247,11 +247,11 @@
 facet.sedimentload.susp_sediment = Schwebstoff
 facet.sedimentload.total = Gesamt
 facet.sedimentload.total_load = Gesamt Geschiebe
-missing.fraction.coarse = Fehlende Fraktion: grober Kies
-missing.fraction.fine_middle = Fehlende Fraktion: fein/mittlerer Kies
-missing.fraction.sand = Fehlende Fraktion: Sand
-missing.fraction.susp_sand = Fehlende Fraktion: susp. Sand
-missing.fraction.susp_sediment = Fehlende Fraktion: Schwebstoffe
+missing.fraction.coarse = Jahr {0}: Fehlende Fraktion: grober Kies
+missing.fraction.fine_middle = Jahr {0}: Fehlende Fraktion: fein/mittlerer Kies
+missing.fraction.sand = Jahr {0}: Fehlende Fraktion: Sand
+missing.fraction.susp_sand = Jahr {0}: Fehlende Fraktion: susp. Sand
+missing.fraction.susp_sediment = Jahr {0}: Fehlende Fraktion: Schwebstoffe
 missing.data.coarse = Fehlende Daten bei grobem Kies
 missing.data.fine_middle = Fehlende Daten bei fein/mittlerem Kies
 missing.data.sand = Fehlende Daten bei Sand
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Fri Apr 12 19:52:15 2013 +0200
@@ -244,11 +244,11 @@
 facet.sedimentload.susp_sediment = Schwebstoff
 facet.sedimentload.total = Gesamt
 facet.sedimentload.total_load = Gesamt Geschiebe
-missing.fraction.coarse = Fehlende Fraktion: grober Kies
-missing.fraction.fine_middle = Fehlende Fraktion: fein/mittlerer Kies
-missing.fraction.sand = Fehlende Fraktion: Sand
-missing.fraction.susp_sand = Fehlende Fraktion: susp. Sand
-missing.fraction.susp_sediment = Fehlende Fraktion: Schwebstoffe
+missing.fraction.coarse = Jahr {0}: Fehlende Fraktion: grober Kies
+missing.fraction.fine_middle = Jahr {0}: Fehlende Fraktion: fein/mittlerer Kies
+missing.fraction.sand = Jahr {0}: Fehlende Fraktion: Sand
+missing.fraction.susp_sand = Jahr {0}: Fehlende Fraktion: susp. Sand
+missing.fraction.susp_sediment = Jahr {0}: Fehlende Fraktion: Schwebstoffe
 missing.data.coarse = Fehlende Daten bei grobem Kies
 missing.data.fine_middle = Fehlende Daten bei fein/mittlerem Kies
 missing.data.sand = Fehlende Daten bei Sand
--- a/flys-artifacts/src/main/resources/messages_en.properties	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Fri Apr 12 19:52:15 2013 +0200
@@ -248,11 +248,11 @@
 facet.sedimentload.susp_sediment = Sediement
 facet.sedimentload.total = Total
 facet.sedimentload.total_load = Total bed load
-missing.fraction.coarse = Missing coarse fraction
-missing.fraction.fine_middle = Missing fine/middle fraction
-missing.fraction.sand = Missing sand fraction
-missing.fraction.susp_sand = Missing susp. sand fraction
-missing.fraction.susp_sediment = Missing susp. sediment fraction
+missing.fraction.coarse = Year {0}: Missing coarse fraction
+missing.fraction.fine_middle = Year {0}: Missing fine/middle fraction
+missing.fraction.sand = Year {0}: Missing sand fraction
+missing.fraction.susp_sand = Year {0}: Missing susp. sand fraction
+missing.fraction.susp_sediment = Year {0}: Missing susp. sediment fraction
 missing.data.coarse = Missing coarse data at
 missing.data.fine_middle = Missing fine/middle data at
 missing.data.sand = Missing sand data at
--- a/flys-backend/doc/schema/oracle-minfo.sql	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-backend/doc/schema/oracle-minfo.sql	Fri Apr 12 19:52:15 2013 +0200
@@ -331,5 +331,5 @@
     cduan                    NUMBER(38,20),
     PRIMARY KEY (id),
     CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE,
-    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id)
+    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE
 );
--- a/flys-backend/doc/schema/oracle.sql	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-backend/doc/schema/oracle.sql	Fri Apr 12 19:52:15 2013 +0200
@@ -220,7 +220,7 @@
 
 CREATE TABLE named_main_values (
     id                  NUMBER(38,0) NOT NULL,
-    name                VARCHAR2(255),
+    name                VARCHAR2(256) NOT NULL UNIQUE,
     type_id             NUMBER(38,0),
     PRIMARY KEY (id)
 );
--- a/flys-backend/doc/schema/postgresql-minfo.sql	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-backend/doc/schema/postgresql-minfo.sql	Fri Apr 12 19:52:15 2013 +0200
@@ -331,6 +331,6 @@
     cduan                  NUMERIC,
     PRIMARY KEY (id),
     CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE,
-    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id)
+    CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE
 );
 COMMIT;
--- a/flys-backend/doc/schema/postgresql.sql	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-backend/doc/schema/postgresql.sql	Fri Apr 12 19:52:15 2013 +0200
@@ -111,8 +111,7 @@
 CREATE TABLE named_main_values (
     id      int PRIMARY KEY NOT NULL,
     name    VARCHAR(256)    NOT NULL UNIQUE,
-    type_id int NOT NULL REFERENCES main_value_types(id),
-    UNIQUE (name, type_id)
+    type_id int NOT NULL REFERENCES main_value_types(id)
 );
 
 -- Table for time intervals
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java	Fri Apr 12 19:51:44 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java	Fri Apr 12 19:52:15 2013 +0200
@@ -292,7 +292,7 @@
                 payload.add(data3);
             } else if (paramName.startsWith("mapfish_")) {
                 String paramValue = req.getParameter(paramName);
-                if (paramValue.equals("null")
+                if (paramValue.equals("null"))
                     paramValue = "";
                 pageSpecs.put(paramName.substring(8), paramValue);
             }

http://dive4elements.wald.intevation.org