comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationzonesAccess.java @ 9506:8b7bf26b8782

Predefined artifact for standard vegetation zones. Some minor adaptions.
author gernotbelger
date Fri, 28 Sep 2018 13:44:12 +0200
parents 611a523fc42f
children
comparison
equal deleted inserted replaced
9505:3f230fe8eb19 9506:8b7bf26b8782
8 * documentation coming with Dive4Elements River for details. 8 * documentation coming with Dive4Elements River for details.
9 */ 9 */
10 10
11 package org.dive4elements.river.artifacts.uinfo.vegetationzones; 11 package org.dive4elements.river.artifacts.uinfo.vegetationzones;
12 12
13 import org.dive4elements.river.artifacts.D4EArtifact;
13 import org.dive4elements.river.artifacts.access.RangeAccess; 14 import org.dive4elements.river.artifacts.access.RangeAccess;
14 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper;
15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; 15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
16 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode;
17 16
18 /** 17 /**
19 * Access to the flow depth calculation type specific SInfo artifact data. 18 * Access to the flow depth calculation type specific SInfo artifact data.
20 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent 19 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent
21 * reference to the artifact instance. 20 * reference to the artifact instance.
23 * 22 *
24 * @author Gernot Belger 23 * @author Gernot Belger
25 */ 24 */
26 final class VegetationzonesAccess extends RangeAccess { 25 final class VegetationzonesAccess extends RangeAccess {
27 26
28 private final EpochYearAccessHelper helper;
29
30 // Fields from state: 27 // Fields from state:
31 // calculation_mode (String) 28 // calculation_mode (String)
32 // ld_from, ld_to,ld_step 29 // ld_from, ld_to,ld_step
33 // vegzones (String) 30 // vegzones (String)
34 31
35 public VegetationzonesAccess(final UINFOArtifact uinfo) { 32 public VegetationzonesAccess(final D4EArtifact uinfo) {
36 super(uinfo); 33 super(uinfo);
37
38 /* assert calculation mode */
39 final UinfoCalcMode calculationMode = uinfo.getCalculationMode();
40 this.helper = new EpochYearAccessHelper(uinfo);
41 assert (calculationMode == UinfoCalcMode.uinfo_vegetation_zones);
42 } 34 }
43 35
44 public String getVegZones() { 36 public String getVegZones() {
45 return super.getString("vegzones"); 37 return super.getString(UINFOArtifact.FIELD_VEGZONES);
46 } 38 }
47
48 } 39 }

http://dive4elements.wald.intevation.org