Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


com.bea.wli.sb.sources
Class XmlObjectSource

java.lang.Object
  extended by com.bea.wli.sb.sources.XmlObjectSource

All Implemented Interfaces:
Source

public class XmlObjectSource
extends java.lang.Object
implements Source

Apache XBean Source Source content is represented as an Apache XBean. The XBean may be typed and so may be accompanied by a SchemaType object and an associated ClassLoader. However, both of these are entirely optional and the XBean may be untyped XML.


Field Summary
static java.lang.String UNSYNC_XML_OPTION
           

 

Fields inherited from interface com.bea.wli.sb.sources.Source
DEFAULT_CHARACTER_SET_ENCODING

 

Constructor Summary
XmlObjectSource(org.apache.xmlbeans.XmlObject xml)
           
XmlObjectSource(org.apache.xmlbeans.XmlObject xml, org.apache.xmlbeans.SchemaType type, java.lang.ClassLoader cl)
           

 

Method Summary
static org.apache.xmlbeans.XmlOptions createXmlOptions(TransformOptions options)
          Utility class that creates a set of XmlOptions from a set of TransformOptions.
 java.lang.ClassLoader getClassLoader()
           
 java.io.InputStream getInputStream(TransformOptions options)
          Returns streaming byte-baseed representation of the Source's content.
static XmlObjectSource getInstance(java.io.InputStream in, TransformOptions options)
          Utility method that creates a new XmlObjectSource from an InputStream containing marshalled XML.
static XmlObjectSource getInstance(org.w3c.dom.Node node, TransformOptions options)
          Utility method that creates a new XmlObjectSource from a DOM node.
static XmlObjectSource getInstance(java.lang.String xmlText, TransformOptions options)
          Utility method that creates a new XmlObjectSource from a piece of text containing stringified XML.
 org.apache.xmlbeans.SchemaType getSchemaType()
           
 org.apache.xmlbeans.XmlObject getXmlObject()
           
 java.lang.String toString()
           
 void writeTo(java.io.OutputStream os, TransformOptions options)
          Serializes the Source's content to a byte-based stream.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

UNSYNC_XML_OPTION

public static final java.lang.String UNSYNC_XML_OPTION
See Also:
Constant Field Values

Constructor Detail

XmlObjectSource

public XmlObjectSource(org.apache.xmlbeans.XmlObject xml)

XmlObjectSource

public XmlObjectSource(org.apache.xmlbeans.XmlObject xml,
                       org.apache.xmlbeans.SchemaType type,
                       java.lang.ClassLoader cl)

Method Detail

getXmlObject

public org.apache.xmlbeans.XmlObject getXmlObject()

getClassLoader

public java.lang.ClassLoader getClassLoader()

getSchemaType

public org.apache.xmlbeans.SchemaType getSchemaType()

getInputStream

public java.io.InputStream getInputStream(TransformOptions options)
Description copied from interface: Source
Returns streaming byte-baseed representation of the Source's content. The representation of that serialization is entirely up to the Source. Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
Specified by:
getInputStream in interface Source
Parameters:
options - Options used to affect the serialization
Returns:
an InputStream for retrieving the serialized content

writeTo

public void writeTo(java.io.OutputStream os,
                    TransformOptions options)
             throws java.io.IOException
Description copied from interface: Source
Serializes the Source's content to a byte-based stream. The representation of that serialization is entirely up to the Source. The Source is forbidden from closing the provided OutputStream, although it is allowed to flush it. However, flushing the stream should be left to the caller, if possible. <p/> Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
Specified by:
writeTo in interface Source
Parameters:
os - the OutputStream to which serialized content will be written
options - TransformOptions used to affect the serialization
Throws:
java.io.IOException

createXmlOptions

public static org.apache.xmlbeans.XmlOptions createXmlOptions(TransformOptions options)
Utility class that creates a set of XmlOptions from a set of TransformOptions. This method takes into account a base-set of default XmlOptions.
Parameters:
options -
Returns:

getInstance

public static XmlObjectSource getInstance(java.lang.String xmlText,
                                          TransformOptions options)
                                   throws TransformException
Utility method that creates a new XmlObjectSource from a piece of text containing stringified XML.
Parameters:
xmlText -
options -
Returns:
Throws:
TransformException

getInstance

public static XmlObjectSource getInstance(org.w3c.dom.Node node,
                                          TransformOptions options)
                                   throws TransformException
Utility method that creates a new XmlObjectSource from a DOM node.
Parameters:
node -
options -
Returns:
Throws:
TransformException

getInstance

public static XmlObjectSource getInstance(java.io.InputStream in,
                                          TransformOptions options)
                                   throws TransformException
Utility method that creates a new XmlObjectSource from an InputStream containing marshalled XML. This utility method will consume the provided InputStream.
Parameters:
in -
options -
Returns:
Throws:
TransformException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


Copyright © 2008, 2012, Oracle. All rights reserved.