|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.sdo.helper.XMLStreamHelperImpl
public class XMLStreamHelperImpl
Field Summary | |
---|---|
protected HelperContext |
helperContext
|
Fields inherited from interface org.apache.tuscany.sdo.api.XMLStreamHelper |
---|
OPTION_DEFAULT_ROOT_TYPE |
Constructor Summary | |
---|---|
XMLStreamHelperImpl(HelperContext hc)
|
Method Summary | |
---|---|
javax.xml.stream.XMLStreamReader |
createXMLStreamReader(DataObject dataObject)
Creates and returns a XMLStreamReader that can be used to read a DataObject as a XML event stream. |
javax.xml.stream.XMLStreamReader |
createXMLStreamReader(XMLDocument document)
Creates and returns a XMLStreamReader that can be used to read an XMLDocument as a XML event stream. |
HelperContext |
getHelperContext()
|
XMLDocument |
load(javax.xml.stream.XMLStreamReader reader)
Creates and returns an XMLDocument from an XML input stream. |
protected XMLDocument |
loadDocument(javax.xml.stream.XMLStreamReader reader,
Map options)
|
DataObject |
loadObject(javax.xml.stream.XMLStreamReader reader)
Create a DataObject from an element in a XML stream. |
DataObject |
loadObject(javax.xml.stream.XMLStreamReader reader,
Map options)
Create a DataObject from an element in a XML stream. |
void |
save(XMLDocument document,
javax.xml.stream.XMLStreamWriter writer)
Save a XMLDocument to an XML stream. |
void |
save(XMLDocument document,
javax.xml.stream.XMLStreamWriter writer,
Map options)
|
void |
saveObject(DataObject sdo,
javax.xml.stream.XMLStreamWriter writer)
Save a DataObject to an XML stream. |
void |
saveObject(DataObject sdo,
javax.xml.stream.XMLStreamWriter writer,
Map options)
|
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 XMLStreamHelperImpl(HelperContext hc)
Method Detail |
---|
public XMLDocument load(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException, IllegalStateException
XMLStreamHelper
load
in interface XMLStreamHelper
reader
- the stream to read
javax.xml.stream.XMLStreamException
- if there was a problem reading the stream
IllegalStateException
- if the reader is not positioned on a
START_DOCUMENT eventpublic void save(XMLDocument document, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
XMLStreamHelper
save
in interface XMLStreamHelper
document
- the document to be writtenwriter
- the stream to write to
javax.xml.stream.XMLStreamException
- if there was a problem writing to the streampublic void save(XMLDocument document, javax.xml.stream.XMLStreamWriter writer, Map options) throws javax.xml.stream.XMLStreamException
save
in interface XMLStreamHelper
javax.xml.stream.XMLStreamException
public javax.xml.stream.XMLStreamReader createXMLStreamReader(XMLDocument document) throws javax.xml.stream.XMLStreamException
XMLStreamHelper
createXMLStreamReader
in interface XMLStreamHelper
document
- the XMLDocument to be read
javax.xml.stream.XMLStreamException
public final DataObject loadObject(javax.xml.stream.XMLStreamReader reader, Map options) throws javax.xml.stream.XMLStreamException, IllegalStateException
XMLStreamHelper
loadObject
in interface XMLStreamHelper
reader
- the stream to readoptions
- OPTION_DEFAULT_ROOT_TYPE
; can be null or empty
javax.xml.stream.XMLStreamException
- if there was a problem reading the stream
IllegalStateException
- if the reader is not positioned on a
START_ELEMENT eventpublic DataObject loadObject(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException, IllegalStateException
XMLStreamHelper
loadObject
in interface XMLStreamHelper
reader
- the stream to read
javax.xml.stream.XMLStreamException
- if there was a problem reading the stream
IllegalStateException
- if the reader is not positioned on a
START_ELEMENT eventpublic void saveObject(DataObject sdo, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
XMLStreamHelper
saveObject
in interface XMLStreamHelper
sdo
- the DataObject to be writtenwriter
- the stream to write to
javax.xml.stream.XMLStreamException
- if there was a problem writing to the streampublic void saveObject(DataObject sdo, javax.xml.stream.XMLStreamWriter writer, Map options) throws javax.xml.stream.XMLStreamException
saveObject
in interface XMLStreamHelper
javax.xml.stream.XMLStreamException
public javax.xml.stream.XMLStreamReader createXMLStreamReader(DataObject dataObject)
XMLStreamHelper
createXMLStreamReader
in interface XMLStreamHelper
dataObject
- the DataObject to be read
protected XMLDocument loadDocument(javax.xml.stream.XMLStreamReader reader, Map options) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public HelperContext getHelperContext()
getHelperContext
in interface XMLStreamHelper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |