Class MxWriteConfiguration
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.MxWriteConfiguration
-
public class MxWriteConfiguration extends java.lang.Object
Options to customize the behaviour of the MX writer (model into XML serialization) in theAbstractMX
and its specific types subclasses.- Since:
- 9.1.7
-
-
Field Summary
Fields Modifier and Type Field Description TypeAdaptersConfiguration
adapters
Type adapters for the marshallerjakarta.xml.bind.JAXBContext
context
Optional instance to pass to the write method, if null, a new instance will be created when neededjava.lang.String
documentPrefix
The prefix for the document namespace.EscapeHandler
escapeHandler
Enables switching between different implementations for the element and attributes value escaping.java.lang.String
headerPrefix
The prefix for the header namespace.boolean
includeXMLDeclaration
Determines if the XML will include the XML declaration as first line.java.lang.String
indent
Optional indent string to use when marshalling into XML, if null, a four spaces string will be used as defaultjava.lang.String
rootElement
The name of the envelope element that binds a Header to the message to which it applies is implementation/network specific.
-
Constructor Summary
Constructors Constructor Description MxWriteConfiguration()
Creates a configuration with the default options and adaptersMxWriteConfiguration(MxReadConfiguration readConf)
Creates a configuration with the default options and propagates the adapters from read to write configurationMxWriteConfiguration(jakarta.xml.bind.JAXBContext context)
-
-
-
Field Detail
-
rootElement
public java.lang.String rootElement
The name of the envelope element that binds a Header to the message to which it applies is implementation/network specific. The header root element ‘AppHdr’ and the ISO 20022 MessageDefinition root element ‘Document’ must always be sibling elements in any XML document, with the AppHdr element preceding the Document element. If no root element name is provided the value inAbstractMX.DEFAULT_ROOT_ELEMENT
is used as default
-
includeXMLDeclaration
public boolean includeXMLDeclaration
Determines if the XML will include the XML declaration as first line. It is true by default. You can switch this off if the generated XML will then be used a a fragment of another XML wrapper.
-
escapeHandler
public EscapeHandler escapeHandler
Enables switching between different implementations for the element and attributes value escaping. Some implementations are available in the library and your own custom class can also be used. This is useful if you handle XML messages with specific charset and you want to control what is escaped and what is propagated as is.
-
headerPrefix
public java.lang.String headerPrefix
The prefix for the header namespace. Set it to null if you don't want to have any prefix in header elements. It is "h" by default.
-
documentPrefix
public java.lang.String documentPrefix
The prefix for the document namespace. Set it to null if you don't want to have any prefix in document elements. It is "Doc" by default.
-
adapters
public TypeAdaptersConfiguration adapters
Type adapters for the marshaller- Since:
- 9.2.6
-
context
public jakarta.xml.bind.JAXBContext context
Optional instance to pass to the write method, if null, a new instance will be created when needed- Since:
- 9.3.5
-
indent
public java.lang.String indent
Optional indent string to use when marshalling into XML, if null, a four spaces string will be used as default- Since:
- 9.3.6
-
-
Constructor Detail
-
MxWriteConfiguration
public MxWriteConfiguration()
Creates a configuration with the default options and adapters
-
MxWriteConfiguration
public MxWriteConfiguration(jakarta.xml.bind.JAXBContext context)
-
MxWriteConfiguration
public MxWriteConfiguration(MxReadConfiguration readConf)
Creates a configuration with the default options and propagates the adapters from read to write configuration- Since:
- 9.2.6
-
-