diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 73:504570de21fd

Refactoring Work depending on Infrastructurchanges in the Artifact-Module gnv-artifacts/trunk@79 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 14 Sep 2009 10:32:38 +0000
parents e4ecf3188bdf
children 0e38f512f7e4
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Thu Sep 10 13:14:03 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Mon Sep 14 10:32:38 2009 +0000
@@ -3,6 +3,8 @@
  */
 package de.intevation.gnv.artifacts;
 
+import java.io.IOException;
+import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -23,6 +25,7 @@
 import de.intevation.artifactdatabase.XMLUtils;
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.ArtifactNamespaceContext;
+import de.intevation.artifacts.CallContext;
 import de.intevation.gnv.artifacts.context.GNVArtifactContext;
 import de.intevation.gnv.transition.DefaultInputData;
 import de.intevation.gnv.transition.InputData;
@@ -84,10 +87,10 @@
     }
     
     /**
-     * @see de.intevation.artifactdatabase.DefaultArtifact#advance(org.w3c.dom.Document, java.lang.Object)
+     * @see de.intevation.artifactdatabase.DefaultArtifact#advance(org.w3c.dom.Document, de.intevation.artifacts.CallContext)
      */
     @Override
-    public Document advance(Document target, Object context) {
+    public Document advance(Document target, CallContext context) {
         Document result = XMLUtils.newDocument();
         if (this.current != null){
             String transitionName = this.readTransitionName(target);
@@ -139,10 +142,10 @@
     }
     
     /**
-     * @see de.intevation.artifactdatabase.DefaultArtifact#feed(org.w3c.dom.Document, java.lang.Object)
+     * @see de.intevation.artifactdatabase.DefaultArtifact#feed(org.w3c.dom.Document, de.intevation.artifacts.CallContext)
      */
     @Override
-    public Document feed(Document target, Object context) {
+    public Document feed(Document target, CallContext context) {
         Document result = XMLUtils.newDocument();
         try {
             if (this.current != null){
@@ -314,19 +317,25 @@
     /**
      * @see de.intevation.artifactdatabase.DefaultArtifact#out(org.w3c.dom.Document, java.lang.Object)
      */
-    public byte[] out(Document format, Object context) {
+ 
+    
+    /**
+     * @see de.intevation.artifactdatabase.DefaultArtifact#out(org.w3c.dom.Document, java.io.OutputStream, de.intevation.artifacts.CallContext)
+     */
+    @Override
+    public void out(Document format, OutputStream outputStream, CallContext context)
+            throws IOException {
         log.debug("TGNVArtifactBase.out");
         try {
             
             if (current != null && current instanceof OutputTransition){
-                return ((OutputTransition)current).out(this.readOutputType(format));
+              ((OutputTransition)current).out(this.readOutputType(format), outputStream);
             }
         } catch (TransitionException e) {
             log.error(e,e);
         }
-        return null;
     }
-    
+
     protected String readOutputType(Document document){
         String value = Config.getStringXPath(document,"action/out/@name");
         return value;

http://dive4elements.wald.intevation.org