com.ddtek.xmlconverter
Class XMLStreamWriterSource

java.lang.Object
  extended by com.ddtek.xmlconverter.XMLStreamWriterSource
All Implemented Interfaces:
Source

public class XMLStreamWriterSource
extends Object
implements Source

The class XMLStreamWriterSource is used to specify that the user of Converter wants to provide the source data for the conversion by writing it to an XMLStreamWriter.


Constructor Summary
XMLStreamWriterSource()
          Create an empty XMLStreamWriterSource.
 
Method Summary
 String getSystemId()
          Get the SystemId of the source data.
 javax.xml.stream.XMLStreamWriter getXMLStreamWriter()
          Get the XMLStreamWriter which will be used to write the source data.
 void setSystemId(String systemId)
          Set the SystemId of the source data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStreamWriterSource

public XMLStreamWriterSource()
Create an empty XMLStreamWriterSource. After starting the conversion, the caller should call getXMLStreamWriter to get the XMLStreamWriter.

Method Detail

setSystemId

public void setSystemId(String systemId)
Set the SystemId of the source data.

Specified by:
setSystemId in interface Source

getSystemId

public String getSystemId()
Get the SystemId of the source data.

Specified by:
getSystemId in interface Source

getXMLStreamWriter

public javax.xml.stream.XMLStreamWriter getXMLStreamWriter()
Get the XMLStreamWriter which will be used to write the source data.

If the application wants to provide the Converter source data with an XMLStreamWriter, it should create an empty XMLStreamWriterSource and pass it as the source parameter of the convert(Source, Result) method. After convert returns, the application must use getXMLStreamWriter() to get the XMLStreamWriter. The application must then write all the data to the XMLStreamWriter and close it. At that moment, the Converter completes converting the data.

Returns:
The XMLStreamWriter.
See Also:
ConvertFromXML.getXMLStreamWriter(javax.xml.transform.Result)