|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.sdo.helper.XMLHelperImpl
public class XMLHelperImpl
A helper to convert XML documents into DataObects and DataObjects into XML documnets.
Field Summary | |
---|---|
protected HelperContext |
helperContext
|
Fields inherited from interface commonj.sdo.helper.XMLHelper |
---|
INSTANCE |
Constructor Summary | |
---|---|
XMLHelperImpl(HelperContext hc)
|
Method Summary | |
---|---|
XMLDocument |
createDocument(DataObject dataObject,
String rootElementURI,
String rootElementName)
Creates an XMLDocument with the specified XML rootElement for the DataObject. |
HelperContext |
getHelperContext()
|
XMLDocument |
load(InputStream inputStream)
Creates and returns an XMLDocument from the inputStream. |
XMLDocument |
load(InputStream inputStream,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputStream. |
XMLDocument |
load(Reader inputReader,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputReader. |
XMLDocument |
load(Source source,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputSource. |
XMLDocument |
load(String inputString)
Creates and returns an XMLDocument from the input String. |
XMLDocument |
load(String inputString,
Object options)
|
String |
save(DataObject dataObject,
String rootElementURI,
String rootElementName)
Returns the DataObject saved as an XML document with the specified root element. |
String |
save(DataObject dataObject,
String rootElementURI,
String rootElementName,
Object options)
|
void |
save(DataObject dataObject,
String rootElementURI,
String rootElementName,
OutputStream outputStream)
Saves the DataObject as an XML document with the specified root element. |
void |
save(DataObject dataObject,
String rootElementURI,
String rootElementName,
OutputStream outputStream,
Object options)
|
void |
save(XMLDocument xmlDocument,
OutputStream outputStream,
Object options)
Serializes an XMLDocument as an XML document into the outputStream. |
void |
save(XMLDocument xmlDocument,
Result outputResult,
Object options)
Serializes an XMLDocument as an XML document into the outputResult in a serialization technology independent format (as specified in javax.xml.transform). |
void |
save(XMLDocument xmlDocument,
Writer outputWriter,
Object options)
Serializes an XMLDocument as an XML document into the outputWriter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HelperContext helperContext
Constructor Detail |
---|
public XMLHelperImpl(HelperContext hc)
Method Detail |
---|
public XMLDocument load(String inputString)
XMLHelper
load
in interface XMLHelper
inputString
- specifies the String to read from
public XMLDocument load(String inputString, Object options)
public XMLDocument load(InputStream inputStream) throws IOException
XMLHelper
load
in interface XMLHelper
inputStream
- specifies the InputStream to read from
IOException
- for stream exceptions.public XMLDocument load(InputStream inputStream, String locationURI, Object options) throws IOException
XMLHelper
load
in interface XMLHelper
inputStream
- specifies the InputStream to read fromlocationURI
- specifies the URI of the document for relative schema locationsoptions
- implementation-specific options.
IOException
- for stream exceptions.public XMLDocument load(Reader inputReader, String locationURI, Object options) throws IOException
XMLHelper
load
in interface XMLHelper
inputReader
- specifies the Reader to read fromlocationURI
- specifies the URI of the document for relative schema locationsoptions
- implementation-specific options.
IOException
- for stream exceptions.public XMLDocument load(Source source, String locationURI, Object options) throws IOException
XMLHelper
load
in interface XMLHelper
source
- specifies the Source to read fromlocationURI
- specifies the URI of the document for relative schema locationsoptions
- implementation-specific options.
IOException
- for stream exceptions.public String save(DataObject dataObject, String rootElementURI, String rootElementName)
XMLHelper
save
in interface XMLHelper
dataObject
- specifies DataObject to be savedrootElementURI
- the Target Namespace URI of the root XML elementrootElementName
- the Name of the root XML element
public String save(DataObject dataObject, String rootElementURI, String rootElementName, Object options)
public void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws IOException
XMLHelper
save
in interface XMLHelper
dataObject
- specifies DataObject to be savedrootElementURI
- the Target Namespace URI of the root XML elementrootElementName
- the Name of the root XML elementoutputStream
- specifies the OutputStream to write to.
IOException
- for stream exceptions.public void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream, Object options) throws IOException
IOException
public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException
XMLHelper
save
in interface XMLHelper
xmlDocument
- specifies XMLDocument to be savedoutputStream
- specifies the OutputStream to write to.options
- implementation-specific options.
IOException
- for stream exceptions.public void save(XMLDocument xmlDocument, Writer outputWriter, Object options) throws IOException
XMLHelper
save
in interface XMLHelper
xmlDocument
- specifies XMLDocument to be savedoutputWriter
- specifies the Writer to write to.options
- implementation-specific options.
IOException
- for stream exceptions.public void save(XMLDocument xmlDocument, Result outputResult, Object options) throws IOException
XMLHelper
save
in interface XMLHelper
xmlDocument
- specifies XMLDocument to be savedoutputResult
- specifies Result to be savedoptions
- implementation-specific options.
IOException
- for stream exceptions.public XMLDocument createDocument(DataObject dataObject, String rootElementURI, String rootElementName)
XMLHelper
createDocument
in interface XMLHelper
dataObject
- specifies DataObject to be savedrootElementURI
- the Target Namespace URI of the root XML elementrootElementName
- the Name of the root XML element
public HelperContext getHelperContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |