changeset 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 (2010-01-04)
parents bc5901bb4525
children 537e663d6c0c
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java
diffstat 2 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Mon Jan 04 12:42:16 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Jan 04 13:14:27 2010 +0000
@@ -1,8 +1,16 @@
+2010-01-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java:
+	  Fix class cast exception to enable PDF export of
+	  vertical cross section charts.
+
+	* ChangeLog: Typo fixes.
+
 2010-01-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/gnv/jfreechart/PolygonRenderer.java:
 	  Uses ValueAxis.valueToJava2D() to transform data values into chart
-	  space. This slower than doing it via the Java2D matrix stack
+	  space. This is slower than doing it via the Java2D matrix stack
 	  but its more the JFreeChart way and prevents transforming of
 	  graphical attributes too. TODO: Speed this up again!
 
--- 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