Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java @ 98:156db25ad4b4
Add Statisticssupport also to VerticalProfiles
gnv-artifacts/trunk@144 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 28 Sep 2009 10:20:41 +0000 |
parents | 13402ac8d8fe |
children | bb45c5097cb6 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Mon Sep 28 09:53:17 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Mon Sep 28 10:20:41 2009 +0000 @@ -32,6 +32,7 @@ import de.intevation.gnv.chart.exception.TechnicalChartException; import de.intevation.gnv.geobackend.base.Result; import de.intevation.gnv.statistics.Statistic; +import de.intevation.gnv.statistics.Statistics; import de.intevation.gnv.statistics.TimeseriesStatistics; import de.intevation.gnv.statistics.exception.StatisticsException; import de.intevation.gnv.transition.InputData; @@ -129,8 +130,8 @@ } }else if (outputMode.equalsIgnoreCase("statistics")){ log.debug("Statistics will be generated."); - TimeseriesStatistics tss = new TimeseriesStatistics(); - Collection<Statistic> statistics = tss.calculateStatistics(this.chartResult); + Statistics s = getStatisticsGenerator(); + Collection<Statistic> statistics = s.calculateStatistics(this.chartResult); Document doc = this.writeStatistics2XML(statistics); this.writeDocument2OutputStream(doc, outputStream); } @@ -145,6 +146,14 @@ throw new TransitionException(e); } } + + /** + * @return + */ + protected Statistics getStatisticsGenerator() { + Statistics s = new TimeseriesStatistics(); + return s; + } protected void writeDocument2OutputStream(Document document, OutputStream os){