diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationAccess.java @ 9145:e6b63b2b41b9

sinfo.flood_duration pdf, csv, ui
author gernotbelger
date Tue, 12 Jun 2018 10:23:23 +0200
parents 611a523fc42f
children 1614cb14308f
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationAccess.java	Mon Jun 11 09:55:35 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationAccess.java	Tue Jun 12 10:23:23 2018 +0200
@@ -16,8 +16,6 @@
 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
 import org.dive4elements.river.artifacts.sinfo.SinfoCalcMode;
 
-import gnu.trove.TDoubleArrayList;
-
 /**
  * Access to the flow depth calculation type specific SInfo artifact data.
  * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent
@@ -32,20 +30,6 @@
 
     private final EpochYearAccessHelper helper;
 
-    /// Fields from state:
-
-    // calculation_mode (String), sollte sinfo_calc_flood_duration sein
-    // ld_from, ld_to, ld_step
-    // riverside, mögliche werte: "state.sinfo.riverside.left" "state.sinfo.riverside.right" "state.sinfo.riverside.both"
-    // wspl
-    // State.sinfo.WQ:
-    // <data name="wq_isq" type="Boolean" />
-    // <data name="wq_isfree" type="Boolean" />
-    // <data name="wq_isrange" type="Boolean" />
-    // <data name="wq_from" type="Double" />
-    // <data name="wq_to" type="Double" />
-    // <data name="wq_step" type="Double" />
-    // <data name="wq_single" type="Double[]" />
     public FloodDurationAccess(final SINFOArtifact artifact) {
         super(artifact);
 
@@ -64,86 +48,4 @@
         return super.getString("riverside");
     }
 
-    public Boolean getWspl() {
-        return super.getBoolean("wspl");
-    }
-
-    public Boolean getWqIsQ() {
-        if (!getWspl()) {
-            return null;//
-        }
-        return super.getBoolean("wq_isq");
-    }
-
-    public Boolean getWqIsFree() {
-        if (!getWspl()) {
-            return null;//
-        }
-        return super.getBoolean("wq_isfree");
-    }
-
-    public Boolean getWqIsRange() {
-        if (!getWspl()) {
-            return null;//
-        }
-        return super.getBoolean("wq_isrange");
-    }
-
-    public Double getWqFrom() {
-        if (!getWspl()) {
-            return null;//
-        }
-        if (!getWqIsRange())
-            return null;
-
-        return super.getDouble("wq_from");
-    }
-
-    public Double getWqTo() {
-        if (!getWspl()) {
-            return null;//
-        }
-        if (!getWqIsRange())
-            return null;
-        return super.getDouble("wq_to");
-    }
-
-    public Double getWqStep() {
-        if (!getWspl()) {
-            return null;
-        }
-        if (!getWqIsRange())
-            return null;
-
-        return super.getDouble("wq_step");
-    }
-
-    public double[] getWqSingle() {
-        if (!getWspl()) {
-            return null;//
-        }
-        if (getWqIsRange())
-            return null;
-
-        final String wqSingles = super.getString("wq_single");
-
-        if (wqSingles == null || wqSingles.isEmpty()) {
-            log.warn("No wqSingles provided");
-            return null;
-        }
-        final TDoubleArrayList doubles = new gnu.trove.TDoubleArrayList();
-        for (final String value : wqSingles.split(" ")) {
-            try {
-
-                doubles.add(Double.parseDouble(value));// Punkt/komma?
-            }
-            catch (final NumberFormatException e) {
-                /* Client should prevent this */
-                log.warn("Invalid wqsingle value: " + value);
-                continue;
-            }
-        }
-        return doubles.toNativeArray();
-    }
-
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org