changeset 9525:967ca59cc11a

Minor cleanup
author gernotbelger
date Mon, 01 Oct 2018 18:07:49 +0200
parents 9dc6427059b2
children 51212d40ff56
files artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java
diffstat 1 files changed, 10 insertions(+), 102 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java	Mon Oct 01 17:45:43 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java	Mon Oct 01 18:07:49 2018 +0200
@@ -17,13 +17,6 @@
 
     private static Logger log = Logger.getLogger(BunduAccess.class);
 
-    // Alles, was in super steht, auskommentiert. TODO: endgültig löschen, nachdem ich es etwas verstanden habe
-
-    // protected DateRange referencePeriod;
-    // protected DateRange[] analysisPeriods;
-    //
-    // protected double[] qs;
-
     public BunduAccess(final D4EArtifact artifact) {
         super(artifact);
     }
@@ -55,16 +48,16 @@
     public Integer getUd() {
         if (getUd_Q_mode().equals("UD"))
             return getInteger("bundu.wst.ud_value");
-        else
-            return null;
+
+        return null;
     }
 
     @Override
     public double[] getQs() {
         if (getUd_Q_mode().equals("Q"))
             return super.getQs();
-        else
-            return null;
+
+        return null;
     }
 
     private String getUd_Q_mode() {
@@ -74,15 +67,15 @@
     public Double getMissingVolFrom() {
         if (isCalculateMissingVolume())
             return getDouble("ld_from_part");
-        else
-            return null;
+
+        return null;
     }
 
     public Double getMissingVolTo() {
         if (isCalculateMissingVolume())
             return getDouble("ld_to_part");
-        else
-            return null;
+
+        return null;
     }
 
     public boolean isCalculateMissingVolume() {
@@ -96,11 +89,9 @@
         if (data == null || !isCalculateMissingVolume()) {
             log.warn("No 'soundings' parameter specified!");
             return null;
-        } else {
-            log.debug("getBedHeightIDs(): data=" + data);
         }
 
-        final String[] parts = data.split(";");
+        log.debug("getBedHeightIDs(): data=" + data);
 
         int singleID = 0;
 
@@ -115,87 +106,4 @@
         }
         return singleID;
     }
-
-    // /** Access the reference date period, return null in case of 'errors'. */
-    // public DateRange getReferencePeriod() {
-    // if (this.referencePeriod == null) {
-    // final StateData refStart = artifact.getData("ref_start");
-    // final StateData refEnd = artifact.getData("ref_end");
-    //
-    // if (refStart == null || refEnd == null) {
-    // log.warn("missing 'ref_start' or 'ref_start' value");
-    // return null;
-    // }
-    //
-    // try {
-    // long rs = Long.parseLong((String) refStart.getValue());
-    // long re = Long.parseLong((String) refEnd.getValue());
-    //
-    // if (rs > re) {
-    // final long t = rs;
-    // rs = re;
-    // re = t;
-    // }
-    //
-    // final Date from = new Date(rs);
-    // final Date to = new Date(re);
-    // this.referencePeriod = new DateRange(from, to);
-    // }
-    // catch (final NumberFormatException nfe) {
-    // log.warn("ref_start or ref_end is not an integer.");
-    // }
-    // }
-    //
-    // return this.referencePeriod;
-    // }
-
-    // @Override
-    // public DateRange[] getAnalysisPeriods() {
-    // if (this.analysisPeriods == null) {
-    // this.analysisPeriods = getDateRange("ana_data");
-    // }
-    //
-    // return this.analysisPeriods;
-    // }
-
-    // /**
-    // * @return DateRange object ranging from eldest to youngest date
-    // * of analysis and reference periods.
-    // */
-    // @Override
-    // public DateRange getDateRange() {
-    // final DateRange refP = getReferencePeriod();
-    //
-    // if (refP == null) {
-    // return null;
-    // }
-    //
-    // Date from = refP.getFrom();
-    // Date to = refP.getTo();
-    //
-    // final DateRange[] rs = getAnalysisPeriods();
-    // for (final DateRange r : rs) {
-    // if (r.getFrom().before(from)) {
-    // from = r.getFrom();
-    // }
-    // if (r.getTo().after(to)) {
-    // to = r.getTo();
-    // }
-    // }
-    //
-    // return new DateRange(from, to);
-    // }
-
-    // @Override
-    // public double[] getQs() {
-    // if (this.qs == null) {
-    // this.qs = getDoubleArray("qs");
-    // }
-    //
-    // if (log.isDebugEnabled() && this.qs != null) {
-    // log.debug("qs: " + Arrays.toString(this.qs));
-    // }
-    // return this.qs;
-    // }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
+}
\ No newline at end of file

http://dive4elements.wald.intevation.org