diff gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 452:4cd03910f97e

Enable PDF export of vertical cross section charts. gnv-artifacts/trunk@500 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 04 Jan 2010 13:14:27 +0000
parents f5a041000357
children 04cfb4e3da4f
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Mon Jan 04 12:42:16 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Mon Jan 04 13:14:27 2010 +0000
@@ -353,9 +353,12 @@
             }
             else if (outputMode.equalsIgnoreCase("csv")) {
                 log.debug("CSV-File will be generated.");
-                Collection<Result> chartResult =
-                    (Collection<Result>) getChartResult(uuid, callContext);
-                this.createCSV(outputStream, chartResult);
+                Object result = getChartResult(uuid, callContext);
+                if (result instanceof Collection) {
+                    this.createCSV(
+                        outputStream,
+                        (Collection<Result>)result);
+                }
             } else if (outputMode.equalsIgnoreCase("statistics")) {
                 log.debug("Statistics will be generated.");
 
@@ -645,7 +648,7 @@
             parameters,
             measurements,
             dates,
-            (Collection) getChartResult(uuid, context),
+            getChartResult(uuid, context),
             locale,
             uuid,
             linesVisible,

http://dive4elements.wald.intevation.org