Package org.codehaus.jettison.mapped
Class MappedXMLStreamWriter
java.lang.Object
org.codehaus.jettison.AbstractXMLStreamWriter
org.codehaus.jettison.mapped.MappedXMLStreamWriter
- All Implemented Interfaces:
XMLStreamWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
JSON property currently being constructed.private final class
Property with a JSONObject value.private final class
Property with a String value. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MappedNamespaceConvention
Element currently being processed.private static final String
private NamespaceContext
private Stack
<MappedXMLStreamWriter.JSONProperty> Stack of open elements.private String
What key is used for text content, when an element has both text and other content?protected Writer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
getProperty
(String arg0) private String
void
setDefaultNamespace
(String arg0) void
setNamespaceContext
(NamespaceContext context) void
void
setValueKey
(String valueKey) void
writeAttribute
(String local, String value) void
writeAttribute
(String ns, String local, String value) void
writeAttribute
(String prefix, String ns, String local, String value) void
writeCharacters
(String text) void
writeDefaultNamespace
(String arg0) void
void
void
writeEntityRef
(String arg0) protected void
writeJSONObject
(JSONObject root) For clients who want to modify the output object before writing to override.void
writeNamespace
(String arg0, String arg1) void
void
writeProcessingInstruction
(String arg0, String arg1) void
void
writeStartElement
(String prefix, String local, String ns) Methods inherited from class org.codehaus.jettison.AbstractXMLStreamWriter
getSerializedAsArrays, isArrayKeysWithSlashAvailable, serializeAsArray, seriliazeAsArray, writeCData, writeCharacters, writeComment, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement
-
Field Details
-
MIXED_CONTENT_VALUE_KEY
- See Also:
-
convention
-
writer
-
namespaceContext
-
valueKey
What key is used for text content, when an element has both text and other content? -
stack
Stack of open elements. -
current
Element currently being processed.
-
-
Constructor Details
-
MappedXMLStreamWriter
-
-
Method Details
-
getPropertyArrayKey
-
getNamespaceContext
-
setNamespaceContext
- Throws:
XMLStreamException
-
getTextKey
-
setValueKey
-
writeStartDocument
- Throws:
XMLStreamException
-
writeStartElement
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String prefix, String ns, String local, String value) throws XMLStreamException - Throws:
XMLStreamException
-
writeAttribute
- Throws:
XMLStreamException
-
writeAttribute
- Throws:
XMLStreamException
-
writeCharacters
- Throws:
XMLStreamException
-
writeEndElement
- Throws:
XMLStreamException
-
writeEndDocument
- Specified by:
writeEndDocument
in interfaceXMLStreamWriter
- Overrides:
writeEndDocument
in classAbstractXMLStreamWriter
- Throws:
XMLStreamException
-
writeJSONObject
For clients who want to modify the output object before writing to override.- Parameters:
root
- root- Throws:
XMLStreamException
- XMLStreamException
-
close
- Throws:
XMLStreamException
-
flush
- Throws:
XMLStreamException
-
getPrefix
- Throws:
XMLStreamException
-
getProperty
- Throws:
IllegalArgumentException
-
setDefaultNamespace
- Throws:
XMLStreamException
-
setPrefix
- Throws:
XMLStreamException
-
writeDefaultNamespace
- Throws:
XMLStreamException
-
writeEntityRef
- Throws:
XMLStreamException
-
writeNamespace
- Throws:
XMLStreamException
-
writeProcessingInstruction
- Throws:
XMLStreamException
-
writeProcessingInstruction
- Throws:
XMLStreamException
-
getConvention
-