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 classJSON property currently being constructed.private final classProperty with a JSONObject value.private final classProperty with a String value. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MappedNamespaceConventionElement currently being processed.private static final Stringprivate NamespaceContextprivate Stack<MappedXMLStreamWriter.JSONProperty> Stack of open elements.private StringWhat key is used for text content, when an element has both text and other content?protected Writer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()///////////////////////////////////////////////////////////////////////////////////////voidflush()getProperty(String arg0) private StringvoidsetDefaultNamespace(String arg0) voidsetNamespaceContext(NamespaceContext context) voidvoidsetValueKey(String valueKey) voidwriteAttribute(String local, String value) voidwriteAttribute(String ns, String local, String value) voidwriteAttribute(String prefix, String ns, String local, String value) voidwriteCharacters(String text) voidwriteDefaultNamespace(String arg0) voidvoidvoidwriteEntityRef(String arg0) protected voidwriteJSONObject(JSONObject root) For clients who want to modify the output object before writing to override.voidwriteNamespace(String arg0, String arg1) voidvoidwriteProcessingInstruction(String arg0, String arg1) voidvoidwriteStartElement(String prefix, String local, String ns) Methods inherited from class 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:
writeEndDocumentin interfaceXMLStreamWriter- Overrides:
writeEndDocumentin 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
-