# HG changeset patch # User Ingo Weinzierl # Date 1328200692 0 # Node ID e7843533f0865e2cb3e59c9dbf4b07a6615b7de8 # Parent 23c7c51df7726aef72eccf8a29dda40710eff290 Improved WQTimerange and HistoricalDischargeFacet. flys-artifacts/trunk@3886 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 23c7c51df772 -r e7843533f086 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Thu Feb 02 15:44:13 2012 +0000 +++ b/flys-artifacts/ChangeLog Thu Feb 02 16:38:12 2012 +0000 @@ -1,3 +1,11 @@ +2012-02-02 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java: Added a + method getTimerange(idx) that returns the Timerange at a given index. + + * src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java: + Return the correct WQTimerange object in getData(). + 2012-02-02 Ingo Weinzierl * src/main/java/de/intevation/flys/exports/XYChartGenerator.java, diff -r 23c7c51df772 -r e7843533f086 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java Thu Feb 02 15:44:13 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java Thu Feb 02 16:38:12 2012 +0000 @@ -65,10 +65,9 @@ CalculationResult res = (CalculationResult) flys.compute(context, hash, stateId, type, false); - // TODO IMPLEMENT ME + WQTimerange[] wqts = (WQTimerange[]) res.getData(); - int[] data = new int[] {3, 4}; - return data; + return wqts[index]; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : diff -r 23c7c51df772 -r e7843533f086 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 Thu Feb 02 15:44:13 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java Thu Feb 02 16:38:12 2012 +0000 @@ -30,6 +30,11 @@ } + public Timerange getTimerange(int idx) { + return ts.get(idx); + } + + public Timerange[] getTimeranges() { return (Timerange[]) ts.toArray(); }