org.apache.axiom.om.ds
Class OMDataSourceExtBase

java.lang.Object
  extended by org.apache.axiom.om.ds.OMDataSourceExtBase
All Implemented Interfaces:
OMDataSource, OMDataSourceExt
Direct Known Subclasses:
ByteArrayDataSource, CharArrayDataSource, InputStreamDataSource, ParserInputStreamDataSource

Deprecated. As described in AXIOM-419, this class has multiple issues and should no longer be used as a base class for OMDataSource implementations. Instead, use AbstractOMDataSource, AbstractPullOMDataSource or AbstractPushOMDataSource.

public abstract class OMDataSourceExtBase
extends Object
implements OMDataSourceExt

OMDataSourceExtBase is a convenient base class that can be extended by other OMDataSourceExt implementations.


Field Summary
 
Fields inherited from interface org.apache.axiom.om.OMDataSourceExt
LOSSY_PREFIX
 
Constructor Summary
OMDataSourceExtBase()
          Deprecated.  
 
Method Summary
 Object getProperty(String key)
          Deprecated. Query a property stored on the OMDataSource
 InputStream getXMLInputStream(String encoding)
          Deprecated. Returns a InputStream representing the xml data
 boolean hasProperty(String key)
          Deprecated. Returns true if property is set
 void serialize(OutputStream output, OMOutputFormat format)
          Deprecated. Serializes element data directly to stream.
 void serialize(Writer writer, OMOutputFormat format)
          Deprecated. Serializes element data directly to writer.
 void serialize(XMLStreamWriter xmlWriter)
          Deprecated. Serializes element data directly to StAX writer.
 Object setProperty(String key, Object value)
          Deprecated. Set a property on the OMDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.axiom.om.OMDataSourceExt
close, copy, getObject, getXMLBytes, isDestructiveRead, isDestructiveWrite
 
Methods inherited from interface org.apache.axiom.om.OMDataSource
getReader
 

Constructor Detail

OMDataSourceExtBase

public OMDataSourceExtBase()
Deprecated. 
Method Detail

getProperty

public Object getProperty(String key)
Deprecated. 
Description copied from interface: OMDataSourceExt
Query a property stored on the OMDataSource

Specified by:
getProperty in interface OMDataSourceExt
Returns:
value or null

setProperty

public Object setProperty(String key,
                          Object value)
Deprecated. 
Description copied from interface: OMDataSourceExt
Set a property on the OMDataSource

Specified by:
setProperty in interface OMDataSourceExt
Returns:
old property object or null

hasProperty

public boolean hasProperty(String key)
Deprecated. 
Description copied from interface: OMDataSourceExt
Returns true if property is set

Specified by:
hasProperty in interface OMDataSourceExt
Returns:
TODO

getXMLInputStream

public InputStream getXMLInputStream(String encoding)
                              throws UnsupportedEncodingException
Deprecated. 
Description copied from interface: OMDataSourceExt
Returns a InputStream representing the xml data

Specified by:
getXMLInputStream in interface OMDataSourceExt
Parameters:
encoding - String encoding of InputStream
Returns:
InputStream
Throws:
UnsupportedEncodingException

serialize

public void serialize(OutputStream output,
                      OMOutputFormat format)
               throws XMLStreamException
Deprecated. 
Description copied from interface: OMDataSource
Serializes element data directly to stream.

It is assumed that this method consumes the content (i.e. destroys the backing object) unless the data source also implements OMDataSourceExt and OMDataSourceExt.isDestructiveWrite() returns false.

Specified by:
serialize in interface OMDataSource
Parameters:
output - destination stream for element XML text
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

serialize

public void serialize(Writer writer,
                      OMOutputFormat format)
               throws XMLStreamException
Deprecated. 
Description copied from interface: OMDataSource
Serializes element data directly to writer.

It is assumed that this method consumes the content (i.e. destroys the backing object) unless the data source also implements OMDataSourceExt and OMDataSourceExt.isDestructiveWrite() returns false.

Specified by:
serialize in interface OMDataSource
Parameters:
writer - destination writer for element XML text
format - output format information (null if none; may be ignored if not supported by data binding even if supplied)
Throws:
XMLStreamException

serialize

public void serialize(XMLStreamWriter xmlWriter)
               throws XMLStreamException
Deprecated. 
Description copied from interface: OMDataSource
Serializes element data directly to StAX writer.

The implementation of this method must satisfy the following requirements:

On the other hand, the caller of this method (typically an OMSourcedElement instance) must ensure that the following requirements are satisfied:

It is assumed that this method consumes the content (i.e. destroys the backing object) unless the data source also implements OMDataSourceExt and OMDataSourceExt.isDestructiveWrite() returns false.

Specified by:
serialize in interface OMDataSource
Parameters:
xmlWriter - destination writer
Throws:
XMLStreamException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.