com.ibm.websphere.bo
Interface BOXMLSerializer

All Known Implementing Classes:
BOXMLSerializerImpl

public interface BOXMLSerializer

The BOXMLSerializer interface represents the client programming model interface for the BOXMLSerializer service. The BOXMLSerializer service provides the following capabilities:

The key elements of a Business Document consist of the name and target namespace of the root element housing the business document and the DataObject contained in the business object. These three elements which represent the Business Document are required for serialization. It is for this reason that the creation operation is provided, to aggregate these elements into a BOXMLDocument that can then be serialized. In addition, BOXMLSerializer also provides a helper operation that enables the three elements to be provided directly to the serialization operation.

The deserialization of the Business Document results in a BOXMLDocuemnt. From that document, the DataObject can be retrieved and utilized.

Note: Some of the operations take options, however, in the initial release of the product there are currently no supported options.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 BOXMLDocument createXMLDocument(commonj.sdo.DataObject businessObject, java.lang.String targetNamespace, java.lang.String rootElementName)
          Creates a BOXMLDocument representing a Business Document consisting of a root element name and its target namespace, and the contained DataObject.
 BOXMLDocument readXMLDocument(java.io.InputStream inputStream)
          Deserializes the Business Document from an input stream.
 BOXMLDocument readXMLDocumentWithOptions(java.io.InputStream inputStream, java.lang.Object options)
          Deserializes the Business Document from an input stream with options.
 void writeDataObject(commonj.sdo.DataObject businessObject, java.lang.String targetNamespace, java.lang.String rootElementName, java.io.OutputStream outputStream)
          Serializes the Business Document consisting of a root element name and target namespace and the containing DataObject to the specified output stream.
 void writeDataObjectWithOptions(commonj.sdo.DataObject businessObject, java.lang.String targetNamespace, java.lang.String rootElementName, java.io.OutputStream outputStream, java.lang.Object options)
          Serializes the Business Document consisting of a root element name and target namespace and the containing DataObject to the specified output stream with options.
 void writeXMLDocument(BOXMLDocument businessDocument, java.io.OutputStream outputStream)
          Serializes the Business Document as a XML v1.0 stream to the specified output stream.
 void writeXMLDocumentWithOptions(BOXMLDocument businessDocument, java.io.OutputStream outputStream, java.lang.Object options)
          Serializes the Business Document as a XML v1.0 stream to the specified output stream with options.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

createXMLDocument

public BOXMLDocument createXMLDocument(commonj.sdo.DataObject businessObject,
                                       java.lang.String targetNamespace,
                                       java.lang.String rootElementName)
Creates a BOXMLDocument representing a Business Document consisting of a root element name and its target namespace, and the contained DataObject.

Parameters:
businessObject - The DataObject portion of the Business Document
targetNamespace - The target namespace of the Business Document
rootElementName - The root element name of the Business Document
Returns:
The created Business Document

writeXMLDocument

public void writeXMLDocument(BOXMLDocument businessDocument,
                             java.io.OutputStream outputStream)
                      throws java.io.IOException
Serializes the Business Document as a XML v1.0 stream to the specified output stream.

Parameters:
businessDocument - The Business Document to serialize
outputStream - The target output stream for the XML v1.0 stream
Throws:
java.io.IOException

writeXMLDocumentWithOptions

public void writeXMLDocumentWithOptions(BOXMLDocument businessDocument,
                                        java.io.OutputStream outputStream,
                                        java.lang.Object options)
                                 throws java.io.IOException
Serializes the Business Document as a XML v1.0 stream to the specified output stream with options.

Parameters:
businessDocument - The Business Document to serialize
outputStream - The target output stream for the XML v1.0 stream
options - Serialization options
Throws:
java.io.IOException

writeDataObject

public void writeDataObject(commonj.sdo.DataObject businessObject,
                            java.lang.String targetNamespace,
                            java.lang.String rootElementName,
                            java.io.OutputStream outputStream)
                     throws java.io.IOException
Serializes the Business Document consisting of a root element name and target namespace and the containing DataObject to the specified output stream.

Parameters:
businessObject - The Business Object
targetNamespace - The target namespace of the Business Document
rootElementName - The root element name of the Business Document
outputStream - The target output stream
Throws:
java.io.IOException

writeDataObjectWithOptions

public void writeDataObjectWithOptions(commonj.sdo.DataObject businessObject,
                                       java.lang.String targetNamespace,
                                       java.lang.String rootElementName,
                                       java.io.OutputStream outputStream,
                                       java.lang.Object options)
                                throws java.io.IOException
Serializes the Business Document consisting of a root element name and target namespace and the containing DataObject to the specified output stream with options.

Parameters:
businessObject - The Business Object
targetNamespace - The target namespace of the Business Document
rootElementName - The root element name of the Business Document
outputStream - The target output stream
options - Serialization options
Throws:
java.io.IOException

readXMLDocument

public BOXMLDocument readXMLDocument(java.io.InputStream inputStream)
                              throws java.io.IOException
Deserializes the Business Document from an input stream.

Parameters:
inputStream - The source input stream
Returns:
The deserialized Business Document
Throws:
java.io.IOException

readXMLDocumentWithOptions

public BOXMLDocument readXMLDocumentWithOptions(java.io.InputStream inputStream,
                                                java.lang.Object options)
                                         throws java.io.IOException
Deserializes the Business Document from an input stream with options.

Parameters:
inputStream - The source input stream
options - Deserialization options
Returns:
The deserialized Business Document
Throws:
java.io.IOException