diff backend/src/main/java/org/dive4elements/river/importer/uinfo/importitem/VegetationZoneImport.java @ 9401:361de818f76e

Added color fields to the vegetation zone database table and importer, max days field changed from exclusive to inclusive
author mschaefer
date Tue, 14 Aug 2018 14:02:26 +0200
parents 201817aa7b1c
children
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/uinfo/importitem/VegetationZoneImport.java	Tue Aug 14 11:06:00 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/uinfo/importitem/VegetationZoneImport.java	Tue Aug 14 14:02:26 2018 +0200
@@ -38,14 +38,23 @@
 
     private final Integer maxOverflowDays;
 
+    private final Integer color_r;
+
+    private final Integer color_g;
+
+    private final Integer color_b;
 
     /***** CONSTRUCTOR *****/
 
-    public VegetationZoneImport(final int vegetationTypeId, final Integer minOverflowDays, final Integer maxOverflowDays) {
+    public VegetationZoneImport(final int vegetationTypeId, final int minOverflowDays, final int maxOverflowDays, final int color_r,
+            final int color_g, final int color_b) {
         super(Double.NaN);
         this.vegetationType = new VegetationTypeImport(vegetationTypeId);
-        this.minOverflowDays = minOverflowDays;
-        this.maxOverflowDays = maxOverflowDays;
+        this.minOverflowDays = Integer.valueOf(minOverflowDays);
+        this.maxOverflowDays = Integer.valueOf(maxOverflowDays);
+        this.color_r = Integer.valueOf(color_r);
+        this.color_g = Integer.valueOf(color_g);
+        this.color_b = Integer.valueOf(color_b);
     }
 
 
@@ -72,6 +81,6 @@
             log.error("Unknown vegetation zone class " + this.vegetationType.getId());
             return null;
         }
-        return new VegetationZone(parent, type, this.minOverflowDays, this.maxOverflowDays);
+        return new VegetationZone(parent, type, this.minOverflowDays, this.maxOverflowDays, this.color_r, this.color_g, this.color_b);
     }
 }

http://dive4elements.wald.intevation.org