annotate artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationzonesAccess.java @ 9070:611a523fc42f

VegetationZoneAccessHelper, VegetationTablePanels verbessert
author gernotbelger
date Tue, 15 May 2018 18:04:36 +0200
parents 1ffd38826175
children 8b7bf26b8782
rev   line source
9069
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
2 * Software engineering by
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
3 * Björnsen Beratende Ingenieure GmbH
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
5 *
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
6 * This file is Free Software under the GNU AGPL (>=v3)
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
8 * documentation coming with Dive4Elements River for details.
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
9 */
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
10
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
11 package org.dive4elements.river.artifacts.uinfo.vegetationzones;
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
12
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
13 import org.dive4elements.river.artifacts.access.RangeAccess;
9070
611a523fc42f VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents: 9069
diff changeset
14 import org.dive4elements.river.artifacts.common.EpochYearAccessHelper;
9069
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
16 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode;
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
17
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
18 /**
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
19 * Access to the flow depth calculation type specific SInfo artifact data.
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
20 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
21 * reference to the artifact instance.
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
22 * Hence we do NOT cache any data.
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
23 *
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
24 * @author Gernot Belger
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
25 */
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
26 final class VegetationzonesAccess extends RangeAccess {
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
27
9070
611a523fc42f VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents: 9069
diff changeset
28 private final EpochYearAccessHelper helper;
9069
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
29
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
30 // Fields from state:
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
31 // calculation_mode (String)
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
32 // ld_from, ld_to,ld_step
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
33 // vegzones (String)
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
34
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
35 public VegetationzonesAccess(final UINFOArtifact uinfo) {
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
36 super(uinfo);
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
37
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
38 /* assert calculation mode */
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
39 final UinfoCalcMode calculationMode = uinfo.getCalculationMode();
9070
611a523fc42f VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents: 9069
diff changeset
40 this.helper = new EpochYearAccessHelper(uinfo);
9069
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
41 assert (calculationMode == UinfoCalcMode.uinfo_vegetation_zones);
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
42 }
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
43
9070
611a523fc42f VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents: 9069
diff changeset
44 public String getVegZones() {
611a523fc42f VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents: 9069
diff changeset
45 return super.getString("vegzones");
9069
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
46 }
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
47
1ffd38826175 access uinfo.vegetationzones+inundation_duration
gernotbelger
parents:
diff changeset
48 }

http://dive4elements.wald.intevation.org