|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axis2.json.gson.GsonXMLStreamWriter
public class GsonXMLStreamWriter
| Constructor Summary | |
|---|---|
GsonXMLStreamWriter(com.google.gson.stream.JsonWriter jsonWriter,
javax.xml.namespace.QName elementQName,
java.util.List<org.apache.ws.commons.schema.XmlSchema> xmlSchemaList,
ConfigurationContext context)
|
|
| Method Summary | |
|---|---|
void |
close()
Close this writer and free any resources associated with the writer. |
void |
flush()
Write any cached data to the underlying output mechanism. |
javax.xml.namespace.NamespaceContext |
getNamespaceContext()
Returns the current namespace context. |
java.lang.String |
getPrefix(java.lang.String uri)
Gets the prefix the uri is bound to |
java.lang.Object |
getProperty(java.lang.String name)
Get the value of a feature/property from the underlying implementation |
void |
setDefaultNamespace(java.lang.String uri)
Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. |
void |
setNamespaceContext(javax.xml.namespace.NamespaceContext context)
Sets the current namespace context for prefix and uri bindings. |
void |
setPrefix(java.lang.String prefix,
java.lang.String uri)
Sets the prefix the uri is bound to. |
void |
writeAttribute(java.lang.String localName,
java.lang.String value)
Writes an attribute to the output stream without a prefix. |
void |
writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Writes an attribute to the output stream |
void |
writeAttribute(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Writes an attribute to the output stream |
void |
writeCData(java.lang.String data)
Writes a CData section |
void |
writeCharacters(char[] text,
int start,
int len)
Write text to the output |
void |
writeCharacters(java.lang.String text)
Write text to the output |
void |
writeComment(java.lang.String data)
Writes an xml comment with the data enclosed |
void |
writeDefaultNamespace(java.lang.String namespaceURI)
Writes the default namespace to the stream |
void |
writeDTD(java.lang.String dtd)
Write a DTD section. |
void |
writeEmptyElement(java.lang.String localName)
Writes an empty element tag to the output |
void |
writeEmptyElement(java.lang.String namespaceURI,
java.lang.String localName)
Writes an empty element tag to the output |
void |
writeEmptyElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
Writes an empty element tag to the output |
void |
writeEndDocument()
Closes any start tags and writes corresponding end tags. |
void |
writeEndElement()
Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event. |
void |
writeEntityRef(java.lang.String name)
Writes an entity reference |
void |
writeNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace |
void |
writeProcessingInstruction(java.lang.String target)
Writes a processing instruction |
void |
writeProcessingInstruction(java.lang.String target,
java.lang.String data)
Writes a processing instruction |
void |
writeStartDocument()
Write the XML Declaration. |
void |
writeStartDocument(java.lang.String version)
Write the XML Declaration. |
void |
writeStartDocument(java.lang.String encoding,
java.lang.String version)
Write the XML Declaration. |
void |
writeStartElement(java.lang.String localName)
Writes a start tag to the output. |
void |
writeStartElement(java.lang.String namespaceURI,
java.lang.String localName)
Writes a start tag to the output |
void |
writeStartElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
Writes a start tag to the output |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GsonXMLStreamWriter(com.google.gson.stream.JsonWriter jsonWriter,
javax.xml.namespace.QName elementQName,
java.util.List<org.apache.ws.commons.schema.XmlSchema> xmlSchemaList,
ConfigurationContext context)
| Method Detail |
|---|
public void writeStartElement(java.lang.String localName)
throws javax.xml.stream.XMLStreamException
writeStartElement in interface javax.xml.stream.XMLStreamWriterlocalName - local name of the tag, may not be null
javax.xml.stream.XMLStreamException
public void writeStartElement(java.lang.String namespaceURI,
java.lang.String localName)
throws javax.xml.stream.XMLStreamException
writeStartElement in interface javax.xml.stream.XMLStreamWriternamespaceURI - the namespaceURI of the prefix to use, may not be nulllocalName - local name of the tag, may not be null
javax.xml.stream.XMLStreamException - if the namespace URI has not been bound to a prefix and
javax.xml.stream.isRepairingNamespaces has not been set to true
public void writeStartElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
throws javax.xml.stream.XMLStreamException
writeStartElement in interface javax.xml.stream.XMLStreamWriterlocalName - local name of the tag, may not be nullprefix - the prefix of the tag, may not be nullnamespaceURI - the uri to bind the prefix to, may not be null
javax.xml.stream.XMLStreamException
public void writeEmptyElement(java.lang.String namespaceURI,
java.lang.String localName)
throws javax.xml.stream.XMLStreamException
writeEmptyElement in interface javax.xml.stream.XMLStreamWriternamespaceURI - the uri to bind the tag to, may not be nulllocalName - local name of the tag, may not be null
javax.xml.stream.XMLStreamException - if the namespace URI has not been bound to a prefix and
javax.xml.stream.isRepairingNamespaces has not been set to true
public void writeEmptyElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
throws javax.xml.stream.XMLStreamException
writeEmptyElement in interface javax.xml.stream.XMLStreamWriterprefix - the prefix of the tag, may not be nulllocalName - local name of the tag, may not be nullnamespaceURI - the uri to bind the tag to, may not be null
javax.xml.stream.XMLStreamException
public void writeEmptyElement(java.lang.String localName)
throws javax.xml.stream.XMLStreamException
writeEmptyElement in interface javax.xml.stream.XMLStreamWriterlocalName - local name of the tag, may not be null
javax.xml.stream.XMLStreamException
public void writeEndElement()
throws javax.xml.stream.XMLStreamException
writeEndElement in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void writeEndDocument()
throws javax.xml.stream.XMLStreamException
writeEndDocument in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void close()
throws javax.xml.stream.XMLStreamException
close in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void flush()
throws javax.xml.stream.XMLStreamException
flush in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void writeAttribute(java.lang.String localName,
java.lang.String value)
throws javax.xml.stream.XMLStreamException
writeAttribute in interface javax.xml.stream.XMLStreamWriterlocalName - the local name of the attributevalue - the value of the attribute
java.lang.IllegalStateException - if the current state does not allow Attribute writing
javax.xml.stream.XMLStreamException
public void writeAttribute(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
throws javax.xml.stream.XMLStreamException
writeAttribute in interface javax.xml.stream.XMLStreamWriterprefix - the prefix for this attributenamespaceURI - the uri of the prefix for this attributelocalName - the local name of the attributevalue - the value of the attribute
java.lang.IllegalStateException - if the current state does not allow Attribute writing
javax.xml.stream.XMLStreamException - if the namespace URI has not been bound to a prefix and
javax.xml.stream.isRepairingNamespaces has not been set to true
public void writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
throws javax.xml.stream.XMLStreamException
writeAttribute in interface javax.xml.stream.XMLStreamWriternamespaceURI - the uri of the prefix for this attributelocalName - the local name of the attributevalue - the value of the attribute
java.lang.IllegalStateException - if the current state does not allow Attribute writing
javax.xml.stream.XMLStreamException - if the namespace URI has not been bound to a prefix and
javax.xml.stream.isRepairingNamespaces has not been set to true
public void writeNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
throws javax.xml.stream.XMLStreamException
writeNamespace in interface javax.xml.stream.XMLStreamWriterprefix - the prefix to bind this namespace tonamespaceURI - the uri to bind the prefix to
java.lang.IllegalStateException - if the current state does not allow Namespace writing
javax.xml.stream.XMLStreamException
public void writeDefaultNamespace(java.lang.String namespaceURI)
throws javax.xml.stream.XMLStreamException
writeDefaultNamespace in interface javax.xml.stream.XMLStreamWriternamespaceURI - the uri to bind the default namespace to
java.lang.IllegalStateException - if the current state does not allow Namespace writing
javax.xml.stream.XMLStreamException
public void writeComment(java.lang.String data)
throws javax.xml.stream.XMLStreamException
writeComment in interface javax.xml.stream.XMLStreamWriterdata - the data contained in the comment, may be null
javax.xml.stream.XMLStreamException
public void writeProcessingInstruction(java.lang.String target)
throws javax.xml.stream.XMLStreamException
writeProcessingInstruction in interface javax.xml.stream.XMLStreamWritertarget - the target of the processing instruction, may not be null
javax.xml.stream.XMLStreamException
public void writeProcessingInstruction(java.lang.String target,
java.lang.String data)
throws javax.xml.stream.XMLStreamException
writeProcessingInstruction in interface javax.xml.stream.XMLStreamWritertarget - the target of the processing instruction, may not be nulldata - the data contained in the processing instruction, may not be null
javax.xml.stream.XMLStreamException
public void writeCData(java.lang.String data)
throws javax.xml.stream.XMLStreamException
writeCData in interface javax.xml.stream.XMLStreamWriterdata - the data contained in the CData Section, may not be null
javax.xml.stream.XMLStreamException
public void writeDTD(java.lang.String dtd)
throws javax.xml.stream.XMLStreamException
writeDTD in interface javax.xml.stream.XMLStreamWriterdtd - the DTD to be written
javax.xml.stream.XMLStreamException
public void writeEntityRef(java.lang.String name)
throws javax.xml.stream.XMLStreamException
writeEntityRef in interface javax.xml.stream.XMLStreamWritername - the name of the entity
javax.xml.stream.XMLStreamException
public void writeStartDocument()
throws javax.xml.stream.XMLStreamException
writeStartDocument in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void writeStartDocument(java.lang.String version)
throws javax.xml.stream.XMLStreamException
writeStartDocument in interface javax.xml.stream.XMLStreamWriterversion - version of the xml document
javax.xml.stream.XMLStreamException
public void writeStartDocument(java.lang.String encoding,
java.lang.String version)
throws javax.xml.stream.XMLStreamException
writeStartDocument in interface javax.xml.stream.XMLStreamWriterencoding - encoding of the xml declarationversion - version of the xml document
javax.xml.stream.XMLStreamException - If given encoding does not match encoding
of the underlying stream
public void writeCharacters(java.lang.String text)
throws javax.xml.stream.XMLStreamException
writeCharacters in interface javax.xml.stream.XMLStreamWritertext - the value to write
javax.xml.stream.XMLStreamException
public void writeCharacters(char[] text,
int start,
int len)
throws javax.xml.stream.XMLStreamException
writeCharacters in interface javax.xml.stream.XMLStreamWritertext - the value to writestart - the starting position in the arraylen - the number of characters to write
javax.xml.stream.XMLStreamException
public java.lang.String getPrefix(java.lang.String uri)
throws javax.xml.stream.XMLStreamException
getPrefix in interface javax.xml.stream.XMLStreamWriterjavax.xml.stream.XMLStreamException
public void setPrefix(java.lang.String prefix,
java.lang.String uri)
throws javax.xml.stream.XMLStreamException
setPrefix in interface javax.xml.stream.XMLStreamWriterprefix - the prefix to bind to the uri, may not be nulluri - the uri to bind to the prefix, may be null
javax.xml.stream.XMLStreamException
public void setDefaultNamespace(java.lang.String uri)
throws javax.xml.stream.XMLStreamException
setDefaultNamespace in interface javax.xml.stream.XMLStreamWriteruri - the uri to bind to the default namespace, may be null
javax.xml.stream.XMLStreamException
public void setNamespaceContext(javax.xml.namespace.NamespaceContext context)
throws javax.xml.stream.XMLStreamException
setNamespaceContext in interface javax.xml.stream.XMLStreamWritercontext - the namespace context to use for this writer, may not be null
javax.xml.stream.XMLStreamExceptionpublic javax.xml.namespace.NamespaceContext getNamespaceContext()
getNamespaceContext in interface javax.xml.stream.XMLStreamWriter
public java.lang.Object getProperty(java.lang.String name)
throws java.lang.IllegalArgumentException
getProperty in interface javax.xml.stream.XMLStreamWritername - The name of the property, may not be null
java.lang.IllegalArgumentException - if the property is not supported
java.lang.NullPointerException - if the name is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||