ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1335664 - in /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om: OMDataSource.java OMDataSourceExt.java
Date Tue, 08 May 2012 18:02:01 GMT
Author: veithen
Date: Tue May  8 18:02:01 2012
New Revision: 1335664

URL: http://svn.apache.org/viewvc?rev=1335664&view=rev
Log:
Removed redundant declarations from OMDataSourceExt and consolidated the Javadoc in OMDataSource.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java?rev=1335664&r1=1335663&r2=1335664&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java
Tue May  8 18:02:01 2012
@@ -35,6 +35,10 @@ import java.io.Writer;
 public interface OMDataSource {
     /**
      * Serializes element data directly to stream.
+     * <p>
+     * It is assumed that this method consumed the content (i.e. destroys the backing object)
unless
+     * the data source also implements {@link OMDataSourceExt} and
+     * {@link OMDataSourceExt#isDestructiveWrite()} returns <code>false</code>.
      * 
      * @param output
      *            destination stream for element XML text
@@ -48,6 +52,10 @@ public interface OMDataSource {
 
     /**
      * Serializes element data directly to writer.
+     * <p>
+     * It is assumed that this method consumed the content (i.e. destroys the backing object)
unless
+     * the data source also implements {@link OMDataSourceExt} and
+     * {@link OMDataSourceExt#isDestructiveWrite()} returns <code>false</code>.
      * 
      * @param writer
      *            destination writer for element XML text
@@ -60,6 +68,10 @@ public interface OMDataSource {
 
     /**
      * Serializes element data directly to StAX writer.
+     * <p>
+     * It is assumed that this method consumed the content (i.e. destroys the backing object)
unless
+     * the data source also implements {@link OMDataSourceExt} and
+     * {@link OMDataSourceExt#isDestructiveWrite()} returns <code>false</code>.
      * 
      * @param xmlWriter
      *            destination writer
@@ -71,6 +83,10 @@ public interface OMDataSource {
     /**
      * Get parser for element data. In the general case this may require the data source
to
      * serialize data as XML text and then parse that text.
+     * <p>
+     * It is assumed that this method consumed the content (i.e. destroys the backing object)
unless
+     * the data source also implements {@link OMDataSourceExt} and
+     * {@link OMDataSourceExt#isDestructiveRead()} returns <code>false</code>.
      * 
      * @return element parser
      * @throws XMLStreamException

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java?rev=1335664&r1=1335663&r2=1335664&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java
Tue May  8 18:02:01 2012
@@ -18,14 +18,8 @@
  */
 package org.apache.axiom.om;
 
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
 import java.io.InputStream;
-import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
-import java.io.Writer;
 
 /**
  * Interface to a backing object that can can be read and written as XML.
@@ -50,55 +44,6 @@ public interface OMDataSourceExt extends
      * obtain the actual prefix name. 
      */
     String LOSSY_PREFIX = "lossyPrefix";
-
-    /**
-     * Serializes element data directly to stream.
-     * <p>
-     * Assumes that the backing object is destroyed during serialization if isDestructiveWrite
-     * 
-     * @param output
-     *            destination stream for element XML text
-     * @param format
-     *            Output format information. The implementation must use this information
to choose
-     *            the correct character set encoding when writing to the output stream. This
-     *            parameter must not be null.
-     * @throws XMLStreamException
-     */
-    void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException;
-
-    /**
-     * Serializes element data directly to writer.
-     * <p>
-     * Assumes that the backing object is destroyed during serialization isDestructiveWrite
-     * 
-     * @param writer
-     *            destination writer for element XML text
-     * @param format
-     *            output format information (<code>null</code> if none; may be
ignored if not
-     *            supported by data binding even if supplied)
-     * @throws XMLStreamException
-     */
-    void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException;
-
-    /**
-     * Serializes element data directly to StAX writer.
-     * <p>
-     * Assumes that the backing object is destroyed during serialization isDestructiveWrite
-     * 
-     * @param xmlWriter
-     *            destination writer
-     * @throws XMLStreamException
-     */
-    void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException;
-
-    /**
-     * Get parser for element data. In the general case this may require the data source
to
-     * serialize data as XML text and then parse that text.
-     * 
-     * @return element parser
-     * @throws XMLStreamException
-     */
-    XMLStreamReader getReader() throws XMLStreamException;
     
     /**
      * Get the object that backs this data source. Application code should in general not
call this



Mime
View raw message