[Dive4elements-commits] [PATCH] Doc, cosmetic and TODO fixes, renamed field in WQTimeRange
Wald Commits
scm-commit at wald.intevation.org
Tue Mar 19 10:32:34 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1363686003 -3600
# Node ID 05eeedc5b156817738016bc193c3e5242160e8db
# Parent b296d435fc692a5182430948ec9e617d1d150c63
Doc, cosmetic and TODO fixes, renamed field in WQTimeRange.
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java
--- 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,
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeFinder.java
--- 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)) {
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java
--- 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
{
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeData.java
--- 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 :
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQKms.java
--- 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 :
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQTimerange.java
--- 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)));
}
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightFacet.java
--- 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.
*/
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java
--- 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)));
}
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixReferenceEventsFacet.java
--- 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;
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/QualityMeasurement.java
--- 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;
}
-
}
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java
--- 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()));
}
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeState.java
--- 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,
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java
--- 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,
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/exports/InfoGeneratorHelper.java
--- 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;
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java
--- 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();
}
diff -r b296d435fc69 -r 05eeedc5b156 flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java
--- 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);
}
-
}
More information about the Dive4elements-commits
mailing list