# HG changeset patch # User Ingo Weinzierl # Date 1258653258 0 # Node ID d6c75171f1e917996633787827a2210dc10f7b1b # Parent 80f7c5dc09c6d9dbe7a473a8068f77ff2f50adb4 Pass the xml document of the request to OutputTransition for more information about output formats of charts (png,jpeg). gnv-artifacts/trunk@353 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 80f7c5dc09c6 -r d6c75171f1e9 gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Thu Nov 19 15:30:27 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Thu Nov 19 17:54:18 2009 +0000 @@ -440,7 +440,7 @@ if (current != null && current instanceof OutputTransition) { ((OutputTransition) current) - .out(this.readOutputType(format), this.parseInputData( + .out(format, this.parseInputData( format, "/action/out/params/input"), outputStream, super.identifier, context.getMeta()); } diff -r 80f7c5dc09c6 -r d6c75171f1e9 gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java Thu Nov 19 15:30:27 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java Thu Nov 19 17:54:18 2009 +0000 @@ -6,6 +6,8 @@ import java.io.OutputStream; import java.util.Collection; +import org.w3c.dom.Document; + import de.intevation.artifacts.CallMeta; import de.intevation.gnv.transition.exception.TransitionException; @@ -23,7 +25,7 @@ * @return The Bytecode of the Result * @throws TransitionException */ - public void out(String outputMode, Collection inputData, + public void out(Document format, Collection inputData, OutputStream outputStream, String uuid, CallMeta callMeta) throws TransitionException; diff -r 80f7c5dc09c6 -r d6c75171f1e9 gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Thu Nov 19 15:30:27 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Thu Nov 19 17:54:18 2009 +0000 @@ -13,6 +13,7 @@ import java.util.Iterator; import java.util.List; +import javax.imageio.ImageIO; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; @@ -33,9 +34,11 @@ import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.PreferredLocale; import de.intevation.gnv.artifacts.ressource.RessourceFactory; +import de.intevation.gnv.chart.TestChart; import de.intevation.gnv.chart.ChartFactory; import de.intevation.gnv.chart.ChartLabels; import de.intevation.gnv.chart.ChartStyle; +import de.intevation.gnv.chart.TimeSeriesChart; import de.intevation.gnv.chart.exception.TechnicalChartException; import de.intevation.gnv.exports.DefaultExport; import de.intevation.gnv.exports.DefaultProfile; @@ -159,10 +162,11 @@ * java.util.Collection, java.io.OutputStream, java.lang.String, * de.intevation.artifacts.CallMeta) */ - public void out(String outputMode, Collection inputData, + public void out(Document format, Collection inputData, OutputStream outputStream, String uuid, CallMeta callMeta) throws TransitionException { log.debug("TimeSeriesOutputTransition.out"); + String outputMode = Config.getStringXPath(format, "action/out/@name"); try { this.advance(uuid, callMeta); // TODO This hsould only be done if it is nessessary