Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZoneServerClientXChange.java @ 9443:515643b2c49a
Added computation of uinfo salix line vegetation zone height (not yet connected to the cross section facet)
author | mschaefer |
---|---|
date | Mon, 20 Aug 2018 18:50:33 +0200 |
parents | e2da9c8a7c57 |
children | d421c2bf0195 |
comparison
equal
deleted
inserted
replaced
9442:173f188569c6 | 9443:515643b2c49a |
---|---|
14 import java.util.TreeSet; | 14 import java.util.TreeSet; |
15 | 15 |
16 import org.dive4elements.artifacts.CallContext; | 16 import org.dive4elements.artifacts.CallContext; |
17 import org.dive4elements.river.artifacts.resources.Resources; | 17 import org.dive4elements.river.artifacts.resources.Resources; |
18 import org.dive4elements.river.model.River; | 18 import org.dive4elements.river.model.River; |
19 import org.dive4elements.river.model.uinfo.VegetationType; | |
20 import org.dive4elements.river.model.uinfo.VegetationZone; | |
19 | 21 |
20 /** | 22 /** |
21 * @author Domenico Nardi Tironi | 23 * @author Domenico Nardi Tironi |
22 * | 24 * |
23 */ | 25 */ |
89 | 91 |
90 public int getMin_day_overflow() { | 92 public int getMin_day_overflow() { |
91 return this.min_day_overflow; | 93 return this.min_day_overflow; |
92 } | 94 } |
93 | 95 |
96 public static String getLocalizedVegetationTypeName(final CallContext context, final VegetationType zonetype) { | |
97 return Resources.getMsg(context.getMeta(), "uinfo_vegetation_type_" + zonetype.getId().toString()); | |
98 } | |
99 | |
94 public static final List<VegetationZoneServerClientXChange> getStandardList(final River river, final CallContext context) { | 100 public static final List<VegetationZoneServerClientXChange> getStandardList(final River river, final CallContext context) { |
95 | 101 |
96 final List<VegetationZoneServerClientXChange> list = new ArrayList<>(); | 102 final List<VegetationZoneServerClientXChange> list = new ArrayList<>(); |
97 for (final org.dive4elements.river.model.uinfo.VegetationZone vz : org.dive4elements.river.model.uinfo.VegetationZone.getValues(river)) { | 103 for (final VegetationZone vz : VegetationZone.getValues(river)) { |
98 final String zn = Resources.getMsg(context.getMeta(), "uinfo_vegetation_type_" + vz.getVegetationType().getId().toString()); | 104 final String zn = getLocalizedVegetationTypeName(context, vz.getVegetationType()); |
99 list.add(new VegetationZoneServerClientXChange(zn, vz.getMin_overflow_days(), vz.getMax_overflow_days(), vz.getColor())); | 105 list.add(new VegetationZoneServerClientXChange(zn, vz.getMin_overflow_days(), vz.getMax_overflow_days(), vz.getColor())); |
100 } | 106 } |
101 return list; | 107 return list; |
102 } | 108 } |
103 | 109 |