comparison 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
comparison
equal deleted inserted replaced
9400:8e100593aec3 9401:361de818f76e
36 36
37 private final Integer minOverflowDays; 37 private final Integer minOverflowDays;
38 38
39 private final Integer maxOverflowDays; 39 private final Integer maxOverflowDays;
40 40
41 private final Integer color_r;
42
43 private final Integer color_g;
44
45 private final Integer color_b;
41 46
42 /***** CONSTRUCTOR *****/ 47 /***** CONSTRUCTOR *****/
43 48
44 public VegetationZoneImport(final int vegetationTypeId, final Integer minOverflowDays, final Integer maxOverflowDays) { 49 public VegetationZoneImport(final int vegetationTypeId, final int minOverflowDays, final int maxOverflowDays, final int color_r,
50 final int color_g, final int color_b) {
45 super(Double.NaN); 51 super(Double.NaN);
46 this.vegetationType = new VegetationTypeImport(vegetationTypeId); 52 this.vegetationType = new VegetationTypeImport(vegetationTypeId);
47 this.minOverflowDays = minOverflowDays; 53 this.minOverflowDays = Integer.valueOf(minOverflowDays);
48 this.maxOverflowDays = maxOverflowDays; 54 this.maxOverflowDays = Integer.valueOf(maxOverflowDays);
55 this.color_r = Integer.valueOf(color_r);
56 this.color_g = Integer.valueOf(color_g);
57 this.color_b = Integer.valueOf(color_b);
49 } 58 }
50 59
51 60
52 /***** METHODS *****/ 61 /***** METHODS *****/
53 62
70 final VegetationType type = this.vegetationType.getPeer(); 79 final VegetationType type = this.vegetationType.getPeer();
71 if (type == null) { 80 if (type == null) {
72 log.error("Unknown vegetation zone class " + this.vegetationType.getId()); 81 log.error("Unknown vegetation zone class " + this.vegetationType.getId());
73 return null; 82 return null;
74 } 83 }
75 return new VegetationZone(parent, type, this.minOverflowDays, this.maxOverflowDays); 84 return new VegetationZone(parent, type, this.minOverflowDays, this.maxOverflowDays, this.color_r, this.color_g, this.color_b);
76 } 85 }
77 } 86 }

http://dive4elements.wald.intevation.org