Package com.adaptris.core.json.streaming
Class JsonStreamingConfigBuilder
- java.lang.Object
-
- com.adaptris.core.json.streaming.JsonStreamingConfigBuilder
-
public class JsonStreamingConfigBuilder extends java.lang.Object
Wrapsde.odysseus.staxon.json.JsonXMLConfigBuilder
for marshalling purposes.In the adapter configuration file this class is aliased as json-streaming-config which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description JsonStreamingConfigBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
autoArray()
boolean
autoPrimitive()
de.odysseus.staxon.json.JsonXMLConfig
build()
java.lang.Boolean
getAutoArray()
Trigger json arrays automatically; default is false if not specifiedjava.lang.Boolean
getAutoPrimitive()
whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.java.lang.Boolean
getMultipleProcessingInstruction()
emit "<?xml-multiple ?>" in the XML; default true if not specified.java.lang.Boolean
getNamespaceDeclarations()
whether to write namespace declarations; default is true if not specified.KeyValuePairSet
getNamespaceMappings()
Any specific namespace mappings.java.lang.Character
getNamespaceSeparator()
namespace separator; default is ':' if not specified.java.lang.Boolean
getPrettyPrint()
pretty print or not; default is false if not specified.java.lang.Boolean
getRepairingNamespaces()
Whether or not to repair namespaces when writing; default is false if not specified.java.lang.String
getVirtualRoot()
Set the virtual rootboolean
multiplePI()
boolean
namespaceDeclarations()
java.util.Map<java.lang.String,java.lang.String>
namespaceMappings()
char
namespaceSeparator()
boolean
prettyPrint()
boolean
repairingNamespaces()
void
setAutoArray(java.lang.Boolean autoArray)
Trigger json arrays automatically; default is false if not specifiedvoid
setAutoPrimitive(java.lang.Boolean autoPrimitive)
whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.void
setMultipleProcessingInstruction(java.lang.Boolean multipleProcessingInstruction)
emit "<?xml-multiple ?>" in the XML; default true if not specified.void
setNamespaceDeclarations(java.lang.Boolean namespaceDeclarations)
whether to write namespace declarations; default is true if not specified.void
setNamespaceMappings(KeyValuePairSet namespaceMappings)
Any specific namespace mappings.void
setNamespaceSeparator(java.lang.Character namespaceSeparator)
namespace separator; default is ':' if not specified.void
setPrettyPrint(java.lang.Boolean prettyPrint)
pretty print or not; default is false if not specified.void
setRepairingNamespaces(java.lang.Boolean repairingNamespaces)
Whether or not to repair namespaces when writing; default is false if not specified.void
setVirtualRoot(java.lang.String virtualRoot)
Set the virtual rootjavax.xml.namespace.QName
virtualRoot()
JsonStreamingConfigBuilder
withAutoArray(java.lang.Boolean b)
JsonStreamingConfigBuilder
withAutoPrimitive(java.lang.Boolean b)
JsonStreamingConfigBuilder
withMultipleProcessingInstruction(java.lang.Boolean b)
JsonStreamingConfigBuilder
withNamespaceDeclarations(java.lang.Boolean b)
JsonStreamingConfigBuilder
withNamespaceMappings(KeyValuePairSet b)
JsonStreamingConfigBuilder
withNamespaceSeparator(java.lang.Character b)
JsonStreamingConfigBuilder
withPrettyPrint(java.lang.Boolean b)
JsonStreamingConfigBuilder
withRepairingNamespaces(java.lang.Boolean b)
JsonStreamingConfigBuilder
withVirtualRoot(java.lang.String b)
-
-
-
Method Detail
-
build
public de.odysseus.staxon.json.JsonXMLConfig build()
-
withAutoArray
public JsonStreamingConfigBuilder withAutoArray(java.lang.Boolean b)
-
autoArray
public boolean autoArray()
-
withAutoPrimitive
public JsonStreamingConfigBuilder withAutoPrimitive(java.lang.Boolean b)
-
autoPrimitive
public boolean autoPrimitive()
-
withNamespaceDeclarations
public JsonStreamingConfigBuilder withNamespaceDeclarations(java.lang.Boolean b)
-
namespaceDeclarations
public boolean namespaceDeclarations()
-
withNamespaceSeparator
public JsonStreamingConfigBuilder withNamespaceSeparator(java.lang.Character b)
-
namespaceSeparator
public char namespaceSeparator()
-
withPrettyPrint
public JsonStreamingConfigBuilder withPrettyPrint(java.lang.Boolean b)
-
prettyPrint
public boolean prettyPrint()
-
withVirtualRoot
public JsonStreamingConfigBuilder withVirtualRoot(java.lang.String b)
-
virtualRoot
public javax.xml.namespace.QName virtualRoot()
-
withRepairingNamespaces
public JsonStreamingConfigBuilder withRepairingNamespaces(java.lang.Boolean b)
-
repairingNamespaces
public boolean repairingNamespaces()
-
withNamespaceMappings
public JsonStreamingConfigBuilder withNamespaceMappings(KeyValuePairSet b)
-
namespaceMappings
public java.util.Map<java.lang.String,java.lang.String> namespaceMappings()
-
withMultipleProcessingInstruction
public JsonStreamingConfigBuilder withMultipleProcessingInstruction(java.lang.Boolean b)
-
multiplePI
public boolean multiplePI()
-
getAutoArray
public java.lang.Boolean getAutoArray()
Trigger json arrays automatically; default is false if not specified
-
setAutoArray
public void setAutoArray(java.lang.Boolean autoArray)
Trigger json arrays automatically; default is false if not specified
-
getAutoPrimitive
public java.lang.Boolean getAutoPrimitive()
whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.
-
setAutoPrimitive
public void setAutoPrimitive(java.lang.Boolean autoPrimitive)
whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.
-
getMultipleProcessingInstruction
public java.lang.Boolean getMultipleProcessingInstruction()
emit "<?xml-multiple ?>" in the XML; default true if not specified.
-
setMultipleProcessingInstruction
public void setMultipleProcessingInstruction(java.lang.Boolean multipleProcessingInstruction)
emit "<?xml-multiple ?>" in the XML; default true if not specified.
-
getNamespaceDeclarations
public java.lang.Boolean getNamespaceDeclarations()
whether to write namespace declarations; default is true if not specified.
-
setNamespaceDeclarations
public void setNamespaceDeclarations(java.lang.Boolean namespaceDeclarations)
whether to write namespace declarations; default is true if not specified.
-
getNamespaceSeparator
public java.lang.Character getNamespaceSeparator()
namespace separator; default is ':' if not specified.
-
setNamespaceSeparator
public void setNamespaceSeparator(java.lang.Character namespaceSeparator)
namespace separator; default is ':' if not specified.
-
getPrettyPrint
public java.lang.Boolean getPrettyPrint()
pretty print or not; default is false if not specified.
-
setPrettyPrint
public void setPrettyPrint(java.lang.Boolean prettyPrint)
pretty print or not; default is false if not specified.
-
getRepairingNamespaces
public java.lang.Boolean getRepairingNamespaces()
Whether or not to repair namespaces when writing; default is false if not specified.
-
setRepairingNamespaces
public void setRepairingNamespaces(java.lang.Boolean repairingNamespaces)
Whether or not to repair namespaces when writing; default is false if not specified.
-
getVirtualRoot
public java.lang.String getVirtualRoot()
Set the virtual rootJSON documents may have have multiple root properties. However, XML requires a single root element. This property specifies the root as a "virtual" element, which will be removed from the stream when writing and added to the stream when reading.
-
setVirtualRoot
public void setVirtualRoot(java.lang.String virtualRoot)
Set the virtual rootJSON documents may have have multiple root properties. However, XML requires a single root element. This property specifies the root as a "virtual" element, which will be removed from the stream when writing and added to the stream when reading.
-
getNamespaceMappings
public KeyValuePairSet getNamespaceMappings()
Any specific namespace mappings.
-
setNamespaceMappings
public void setNamespaceMappings(KeyValuePairSet namespaceMappings)
Any specific namespace mappings.
-
-