changeset 5335:05eeedc5b156

Doc, cosmetic and TODO fixes, renamed field in WQTimeRange.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 19 Mar 2013 10:40:03 +0100
parents b296d435fc69
children ac5ac893fae1
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeFinder.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeData.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQKms.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQTimerange.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixReferenceEventsFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/QualityMeasurement.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java flys-artifacts/src/main/java/de/intevation/flys/exports/InfoGeneratorHelper.java flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java
diffstat 16 files changed, 26 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Tue Mar 19 10:40:03 2013 +0100
@@ -728,6 +728,7 @@
         return gauges;
     }
 
+    /** Populate document with fixings, filtered by range and filter. */
     public void generateOverview(
         Document      document,
         Range         range,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeFinder.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeFinder.java	Tue Mar 19 10:40:03 2013 +0100
@@ -11,6 +11,7 @@
 
 import org.hibernate.type.StandardBasicTypes;
 
+/** Find Gauges and respective main values. */
 public class GaugeFinder
 implements   Serializable
 {
@@ -62,6 +63,8 @@
         this.isKmUp = isKmUp;
     }
 
+
+    /** Find GaugeRange at kilometer. */
     public GaugeRange find(double km) {
         for (GaugeRange gauge: gauges) {
             if (gauge.inside(km)) {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java	Tue Mar 19 10:40:03 2013 +0100
@@ -9,6 +9,9 @@
 
 import org.apache.log4j.Logger;
 
+/**
+ * Gauge, km-range, main values.
+ */
 public class GaugeRange
 extends      Range
 {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeData.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeData.java	Tue Mar 19 10:40:03 2013 +0100
@@ -24,3 +24,4 @@
         return wqs;
     }
 }
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQKms.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQKms.java	Tue Mar 19 10:40:03 2013 +0100
@@ -20,3 +20,4 @@
         return timeInterval;
     }
 }
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQTimerange.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQTimerange.java	Tue Mar 19 10:40:03 2013 +0100
@@ -50,7 +50,7 @@
     public void add(double w, double q, double diff, Timerange t) {
         ws.add(w);
         qs.add(q);
-        ts.add(t);
+        timeranges.add(t);
         diffs.add(diff);
     }
 
@@ -74,7 +74,7 @@
 
     @Override
     public List<TimerangeItem> sort() {
-        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(ts.size());
+        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(timeranges.size());
         for (int i = 0, n = size(); i < n; i++) {
             items.add(new HistoricalTimerangeItem(getTimerange(i), getQ(i), getW(i), diffs.get(i)));
         }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightFacet.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightFacet.java	Tue Mar 19 10:40:03 2013 +0100
@@ -11,6 +11,7 @@
 
 import org.apache.log4j.Logger;
 
+
 /**
  * Facet of a MiddleBedHeight curve.
  */
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java	Tue Mar 19 10:40:03 2013 +0100
@@ -21,6 +21,7 @@
             this.w = w;
         }
 
+        /** Sets [w,q] in wq. */
         public double[] get(double[] wq) {
             if (wq.length >= 2) {
                 wq[0] = w;
@@ -50,7 +51,7 @@
         }
     }
 
-    protected List<Timerange> ts;
+    protected List<Timerange> timeranges;
 
 
     public WQTimerange() {
@@ -60,28 +61,28 @@
 
     public WQTimerange(String name) {
         super(name);
-        ts = new ArrayList<Timerange>();
+        timeranges = new ArrayList<Timerange>();
     }
 
 
     public void add(double w, double q, Timerange t) {
         ws.add(w);
         qs.add(q);
-        ts.add(t);
+        timeranges.add(t);
     }
 
 
     public Timerange getTimerange(int idx) {
-        return ts.get(idx);
+        return timeranges.get(idx);
     }
 
 
     public Timerange[] getTimeranges() {
-        return ts.toArray(new Timerange[ts.size()]);
+        return timeranges.toArray(new Timerange[timeranges.size()]);
     }
 
     public List<TimerangeItem> sort() {
-        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(ts.size());
+        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(timeranges.size());
         for (int i = 0, n = size(); i < n; i++) {
             items.add(new TimerangeItem(getTimerange(i), getQ(i), getW(i)));
         }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixReferenceEventsFacet.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixReferenceEventsFacet.java	Tue Mar 19 10:40:03 2013 +0100
@@ -64,6 +64,8 @@
             FixResult result = (FixResult) res.getData();
             double currentKm = getCurrentKm(context);
 
+            logger.debug("current km in FRE: " + currentKm);
+
             KMIndex<QWD []> kmQWs = result.getReferenced();
             KMIndex.Entry<QWD []> kmQWsEntry = kmQWs.binarySearch(currentKm);
             QWD[] qwds = null;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/QualityMeasurement.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/QualityMeasurement.java	Tue Mar 19 10:40:03 2013 +0100
@@ -76,5 +76,4 @@
     public void setDepth2(double depth2) {
         this.depth2 = depth2;
     }
-
 }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java	Tue Mar 19 10:40:03 2013 +0100
@@ -111,7 +111,7 @@
                     logger
                         .debug("Create another facet for historical differences.");
 
-                    // TODO CREATE BETTER TITLE FOR FACETS
+                    // TODO CREATE BETTER TITLE FOR FACETS (issue1180)
                     facets.add(new HistoricalDischargeDifferenceFacet(i,
                         HISTORICAL_DISCHARGE_Q_DIFF, "DIFF: " + wqt.getName()));
                 }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeState.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeState.java	Tue Mar 19 10:40:03 2013 +0100
@@ -22,7 +22,6 @@
     private static final Logger logger =
         Logger.getLogger(HistoricalDischargeState.class);
 
-
     public static final String I18N_MODE_W = "historical.mode.w";
     public static final String I18N_MODE_Q = "historical.mode.q";
 
@@ -37,6 +36,7 @@
         return "wq_simple_array";
     }
 
+    @Override
     protected void appendItems(
         Artifact       artifact,
         ElementCreator creator,
@@ -83,6 +83,7 @@
     }
 
 
+    /** Get label for display in client, depending on chosen W or Q input. */
     @Override
     protected String getLabelFor(
         CallContext cc,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java	Tue Mar 19 10:40:03 2013 +0100
@@ -202,6 +202,7 @@
     }
 
 
+    /** In obj: 0 is label, 1 is value. */
     protected Element createItem(
         XMLUtils.ElementCreator cr,
         Object   obj,
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/InfoGeneratorHelper.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/InfoGeneratorHelper.java	Tue Mar 19 10:40:03 2013 +0100
@@ -34,10 +34,10 @@
  */
 public class InfoGeneratorHelper {
 
+    /** Private logging instance. */
     private static final Logger logger =
         Logger.getLogger(InfoGeneratorHelper.class);
 
-
     protected ChartGenerator generator;
 
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Tue Mar 19 10:40:03 2013 +0100
@@ -574,7 +574,6 @@
 
             if (atGauge) {
                 String gaugeN;
-                // TODO issue1131, name gauge
                 if (isFixRealize) {
                     gaugeN = findGauge(result[2], gauges).getName();
                 }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java	Tue Mar 19 10:25:23 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java	Tue Mar 19 10:40:03 2013 +0100
@@ -206,5 +206,4 @@
 
         addAxisSeries(series, YAXIS.H.idx, visible);
     }
-
 }

http://dive4elements.wald.intevation.org