Mercurial > dive4elements > river
changeset 2239:e7843533f086
Improved WQTimerange and HistoricalDischargeFacet.
flys-artifacts/trunk@3886 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 02 Feb 2012 16:38:12 +0000 |
parents | 23c7c51df772 |
children | e9173de1026c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <ingo@intevation.de> * src/main/java/de/intevation/flys/exports/XYChartGenerator.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 :
--- 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(); }