axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r193147 - in /webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize: StreamWriterToContentHandlerConverter.java StreamingOMSerializer.java
Date Thu, 23 Jun 2005 14:35:02 GMT
Author: thilina
Date: Thu Jun 23 07:35:01 2005
New Revision: 193147

URL: http://svn.apache.org/viewcvs?rev=193147&view=rev
Log:
changes due to OMOutputer

Modified:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java?rev=193147&r1=193146&r2=193147&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
(original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
Thu Jun 23 07:35:01 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.axis.om.impl.llom.serialize;
 
+import org.apache.axis.om.impl.llom.OMOutputer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.xml.sax.Attributes;
@@ -44,8 +45,8 @@
      *
      * @param writer
      */
-    public StreamWriterToContentHandlerConverter(XMLStreamWriter writer) {
-        this.writer = writer;
+    public StreamWriterToContentHandlerConverter(OMOutputer outputer) {
+        this.writer = outputer.getXmlStreamWriter();
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java?rev=193147&r1=193146&r2=193147&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
(original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
Thu Jun 23 07:35:01 2005
@@ -15,14 +15,15 @@
  */
 package org.apache.axis.om.impl.llom.serialize;
 
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMSerializer;
-
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMSerializer;
+import org.apache.axis.om.impl.llom.OMOutputer;
+
 /**
  * Class StreamingOMSerializer
  */
@@ -44,28 +45,31 @@
      * Method serializeWithCache
      *
      * @param obj
-     * @param writer
+     * @param outputer
      * @throws XMLStreamException
      */
-    public void serialize(Object obj, XMLStreamWriter writer)
+    public void serialize(Object obj, OMOutputer outputer)
             throws XMLStreamException {
         if (!(obj instanceof XMLStreamReader)) {
             throw new UnsupportedOperationException(
                     "Unsupported input object. Must be of the the type XMLStreamReader");
         }
         XMLStreamReader node = (XMLStreamReader) obj;
-        serializeNode(node, writer);
+        serializeNode(node, outputer);
     }
 
     /**
      * Method serializeNode
      *
      * @param reader
-     * @param writer
+     * @param outputer
      * @throws XMLStreamException
      */
-    protected void serializeNode(XMLStreamReader reader, XMLStreamWriter writer)
+    protected void serializeNode(XMLStreamReader reader, OMOutputer outputer)
             throws XMLStreamException {
+    	//TODO We get the StAXWriter at this point and uses it hereafter assuming that this
is the only entry point to this class.
+    	// If there can be other classes calling methodes of this we might need to change methode
signatures to OMOutputer
+    	XMLStreamWriter writer = outputer.getXmlStreamWriter();
         while (reader.hasNext()) {
             int event = reader.next();
             if (event == START_ELEMENT) {



Mime
View raw message