Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java @ 9070:611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
author | gernotbelger |
---|---|
date | Tue, 15 May 2018 18:04:36 +0200 |
parents | 1ffd38826175 |
children | 9b4f5e61c02e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java Tue May 15 12:00:26 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java Tue May 15 18:04:36 2018 +0200 @@ -10,11 +10,8 @@ package org.dive4elements.river.artifacts.uinfo.inundationduration; -import java.util.ArrayList; - -import org.apache.commons.lang.math.DoubleRange; import org.dive4elements.river.artifacts.access.RangeAccess; -import org.dive4elements.river.artifacts.common.AccessHelper; +import org.dive4elements.river.artifacts.common.EpochYearAccessHelper; import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; @@ -31,7 +28,8 @@ // IMMER ABGLEICHEN MIT SuperVegZonesTablePanel.TABLE_CELL_SEPARATOR public static final String TABLE_CELL_SEPARATOR = "TABLE_CELL_SEPARATOR"; public static final String TABLE_ROW_SEPARATOR = "TABLE_ROW_SEPARATOR"; - private final AccessHelper helper; + + private final EpochYearAccessHelper helper; // Fields from state: // @@ -47,19 +45,12 @@ public InundationDurationAccess(final UINFOArtifact uinfo) { super(uinfo); - /* assert calculation mode */ final UinfoCalcMode calculationMode = uinfo.getCalculationMode(); - this.helper = new AccessHelper(uinfo); + this.helper = new EpochYearAccessHelper(uinfo); assert (calculationMode == UinfoCalcMode.uinfo_inundation_duration); } - public DoubleRange getRange() { - final double from = getFrom(); - final double to = getTo(); - return new DoubleRange(from, to); - } - public Double getSedimentHeight() { if (super.getBoolean("use_scenario")) { return super.getDouble("sedimentheight"); // TODO: INPUT Valdiation (nicht hier, sondern im Panel. Erinnerung) @@ -83,20 +74,9 @@ return null; } - public ArrayList<String[]> getVegZones() { - // TODO: MIT VegetationzonesAccess zusammenlegen - final ArrayList<String[]> results = new ArrayList<>(); - final String zonesRaw = super.getString("vegzones"); - if (zonesRaw.contains(TABLE_ROW_SEPARATOR)) { - final String[] rows = zonesRaw.split(TABLE_ROW_SEPARATOR); - for (final String row : rows) { - if (row.contains(TABLE_CELL_SEPARATOR)) { - final String[] result = row.split(TABLE_CELL_SEPARATOR); - results.add(result); - } - } - } - return results; + public String getVegZones() { + // MIT VegetationzonesAccess zusammenlegen (eine Zeile sparen...) + return super.getString("vegzones"); } } \ No newline at end of file