|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.sca.databinding.json.axiom.JSONDataSource
public class JSONDataSource
JSONDataSource keeps the JSON String inside and consumes it when needed. This is to be kept in the OMSourcedElementImpl and can be used either to expand the tree or get the JSON String directly without expanding. This uses the "Mapped" JSON convention.
Field Summary | |
---|---|
protected JSONObject |
json
|
Constructor Summary | |
---|---|
JSONDataSource(JSONObject json)
|
Method Summary | |
---|---|
protected java.lang.String |
getJSONString()
|
javax.xml.stream.XMLStreamReader |
getReader()
Gives the StAX reader using the "Mapped" formatted input JSON String. |
void |
serialize(java.io.OutputStream outputStream,
OMOutputFormat omOutputFormat)
Writes JSON into the output stream. |
void |
serialize(java.io.Writer writer,
OMOutputFormat omOutputFormat)
Writes JSON through the writer. |
void |
serialize(javax.xml.stream.XMLStreamWriter xmlStreamWriter)
Writes XML through the XMLStreamWriter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JSONObject json
Constructor Detail |
---|
public JSONDataSource(JSONObject json)
Method Detail |
---|
public void serialize(java.io.OutputStream outputStream, OMOutputFormat omOutputFormat) throws javax.xml.stream.XMLStreamException
outputStream
- the stream to be written intoomOutputFormat
- format of the message, this is ignored.
javax.xml.stream.XMLStreamException
- if there is an error while writing the message in to the output
stream.public void serialize(java.io.Writer writer, OMOutputFormat omOutputFormat) throws javax.xml.stream.XMLStreamException
writer
- Writer to be written intoomOutputFormat
- format of the message, this is ignored.
javax.xml.stream.XMLStreamException
- if there is an error while writing the message through the writer.public void serialize(javax.xml.stream.XMLStreamWriter xmlStreamWriter) throws javax.xml.stream.XMLStreamException
xmlStreamWriter
- StAX writer to be written into
javax.xml.stream.XMLStreamException
- if there is an error while writing the message through the StAX
writer.public javax.xml.stream.XMLStreamReader getReader() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
- if there is an error while making the StAX reader.protected java.lang.String getJSONString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |