changeset 8175:d2673ca68e70

Precalculated sums from the database will come through recommendations.
author Tom Gottfried <tom@intevation.de>
date Tue, 02 Sep 2014 17:10:22 +0200
parents 4b2b7593815c
children 7b0b3b1a2ee8
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java
diffstat 1 files changed, 20 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Tue Sep 02 14:46:20 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Tue Sep 02 17:10:22 2014 +0200
@@ -35,63 +35,51 @@
     private static final Logger log = Logger
         .getLogger(SedimentLoadDataCalculation.class);
 
-    public static final int [] TOTAL_LOAD_FLYS = {
+    public static final int [] TOTAL_LOAD = {
         SedimentLoadData.GF_COARSE,
         SedimentLoadData.GF_FINE_MIDDLE,
         SedimentLoadData.GF_SAND,
         SedimentLoadData.GF_SUSP_SEDIMENT
     };
 
-    public static final int [] BED_LOAD_FLYS = {
+    public static final int [] BED_LOAD = {
         SedimentLoadData.GF_COARSE,
         SedimentLoadData.GF_FINE_MIDDLE,
         SedimentLoadData.GF_SAND
     };
 
-    public static final int [] BED_LOAD_SUSP_SAND_FLYS = {
+    public static final int [] BED_LOAD_SUSP_SAND = {
         SedimentLoadData.GF_COARSE,
         SedimentLoadData.GF_FINE_MIDDLE,
         SedimentLoadData.GF_SAND,
         SedimentLoadData.GF_SUSP_SAND
     };
 
-    public static final int [] TOTAL_LOAD_BFG = {
-        SedimentLoadData.GF_TOTAL
-    };
-
-    public static final int [] BED_LOAD_BFG = {
-        SedimentLoadData.GF_BED_LOAD
-    };
-
-    public static final int [] SUSPENDED_LOAD_BFG = {
-        SedimentLoadData.GF_SUSPENDED_LOAD
-    };
-
-    public static final int [] COARSE_FLYS = {
+    public static final int [] COARSE = {
         SedimentLoadData.GF_COARSE
     };
 
-    public static final int [] FINE_MIDDLE_FLYS = {
+    public static final int [] FINE_MIDDLE = {
         SedimentLoadData.GF_FINE_MIDDLE
     };
 
-    public static final int [] SAND_FLYS = {
+    public static final int [] SAND = {
         SedimentLoadData.GF_SAND
     };
 
-    public static final int [] SUSP_SAND_FLYS = {
+    public static final int [] SUSP_SAND = {
         SedimentLoadData.GF_SUSP_SAND
     };
 
-    public static final int [] SUSP_SAND_BED_FLYS = {
+    public static final int [] SUSP_SAND_BED = {
         SedimentLoadData.GF_SUSP_SAND_BED
     };
 
-    public static final int [] SUSP_SEDIMENT_FLYS = {
+    public static final int [] SUSP_SEDIMENT = {
         SedimentLoadData.GF_SUSP_SEDIMENT
     };
 
-    public static final int [] AVERAGE_FLYS = {
+    public static final int [] AVERAGE = {
         SedimentLoadData.GF_AVERAGE
     };
 
@@ -119,16 +107,16 @@
     public static final GrainFraction [] GRAIN_FRACTIONS = {
         // TODO: i18n for bfg parts
         // Grain fraction names are alignt to the grain_fractions table
-        GrainFraction.make("total",              TOTAL_LOAD_FLYS),
-        GrainFraction.make("bed_load",           BED_LOAD_FLYS),
-        GrainFraction.make("bed_load_susp_sand", BED_LOAD_SUSP_SAND_FLYS),
-        GrainFraction.make("coarse",             COARSE_FLYS),
-        GrainFraction.make("fine_middle",        FINE_MIDDLE_FLYS),
-        GrainFraction.make("sand",               SAND_FLYS) ,
-        GrainFraction.make("susp_sand",          SUSP_SAND_FLYS),
-        GrainFraction.make("susp_sand_bed",      SUSP_SAND_BED_FLYS),
-        GrainFraction.make("suspended_sediment", SUSP_SEDIMENT_FLYS),
-        GrainFraction.make("average",            AVERAGE_FLYS),
+        GrainFraction.make("total",              TOTAL_LOAD),
+        GrainFraction.make("bed_load",           BED_LOAD),
+        GrainFraction.make("bed_load_susp_sand", BED_LOAD_SUSP_SAND),
+        GrainFraction.make("coarse",             COARSE),
+        GrainFraction.make("fine_middle",        FINE_MIDDLE),
+        GrainFraction.make("sand",               SAND) ,
+        GrainFraction.make("susp_sand",          SUSP_SAND),
+        GrainFraction.make("susp_sand_bed",      SUSP_SAND_BED),
+        GrainFraction.make("suspended_sediment", SUSP_SEDIMENT),
+        GrainFraction.make("average",            AVERAGE),
     };
 
     public static class Sum implements Value.Visitor {

http://dive4elements.wald.intevation.org