@Deprecated
@ProwideDeprecated(phase2=SRU2021)
public class MxParser
extends java.lang.Object
AbstractMX
, AppHdr
, AppHdrParser
, MxNode
or MxParseUtils
Modifier and Type | Class and Description |
---|---|
class |
MxParser.MxStructureInfo
Deprecated.
the
AbstractMX.parse(String) can be used to parse any unknown message. If you just want to
detect the message type you can also use the MxParseUtils.identifyMessage(String) |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOCUMENT_LOCALNAME
Deprecated.
use
AbstractMX.DOCUMENT_LOCALNAME instead |
static java.lang.String |
HEADER_LOCALNAME
Deprecated.
use
AppHdr.HEADER_LOCALNAME instead |
Constructor and Description |
---|
MxParser(java.io.File file)
Deprecated.
Construct a parser for a file containing a single MX message
|
MxParser(java.io.InputStream stream)
Deprecated.
Construct a parser for a stream containing a single MX message
|
MxParser(java.lang.String message)
Deprecated.
Creates the parser initializing its content source from the given string.
|
Modifier and Type | Method and Description |
---|---|
MxParser.MxStructureInfo |
analizeMessage()
Deprecated.
use
analyzeMessage() instead |
MxParser.MxStructureInfo |
analyzeMessage()
Deprecated.
the
AbstractMX.parse(String) can be used to parse any unknown message. If you just want to
detect the message type you can also use the MxParseUtils.identifyMessage(String) |
MxId |
detectMessage()
Deprecated.
use
MxParseUtils.identifyMessage(String) instead |
static java.lang.String |
getBICFromDN(java.lang.String dn)
Deprecated.
use
MxParseUtils.getBICFromDN(String) instead |
MxNode |
parse()
Deprecated.
use
MxNode.parse(String) instead |
AppHdr |
parseAppHdr()
Deprecated.
use
AppHdrParser.parse(String) instead |
static AppHdr |
parseAppHdr(org.w3c.dom.Element e)
Deprecated.
use
AppHdrParser.parse(Element) instead |
com.prowidesoftware.swift.model.mx.dic.ApplicationHeader |
parseApplicationHeader()
Deprecated.
use
LegacyAppHdr.parse(String) instead |
static com.prowidesoftware.swift.model.mx.dic.ApplicationHeader |
parseApplicationHeader(MxNode tree)
Deprecated.
use
LegacyAppHdr.parse(String) instead |
com.prowidesoftware.swift.model.mx.dic.BusinessApplicationHeaderV01 |
parseBusinessApplicationHeaderV01()
Deprecated.
use
BusinessAppHdrV01.parse(String) instead |
static com.prowidesoftware.swift.model.mx.dic.BusinessApplicationHeaderV01 |
parseBusinessApplicationHeaderV01(MxNode tree)
Deprecated.
use
BusinessAppHdrV01.parse(String) instead |
BusinessHeader |
parseBusinessHeader()
Deprecated.
use
AppHdrParser.parse(String) instead |
static BusinessHeader |
parseBusinessHeader(org.w3c.dom.Element e)
Deprecated.
use
AppHdrParser.parse(Element) instead |
java.lang.String |
stripDocument()
Deprecated.
parse the message using
AbstractMX.parse(String) instead, and then use any of the document
serializer AbstractMX.document() methods |
java.lang.String |
stripHeader()
Deprecated.
parse the message using
AbstractMX.parse(String) instead, and then use any of the header
serializer AbstractMX.header() methods |
@Deprecated @ProwideDeprecated(phase2=SRU2021) public static final java.lang.String HEADER_LOCALNAME
AppHdr.HEADER_LOCALNAME
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public static final java.lang.String DOCUMENT_LOCALNAME
AbstractMX.DOCUMENT_LOCALNAME
insteadpublic MxParser(java.io.File file) throws java.io.IOException
file
- the file containing a single unit of a messagejava.io.IOException
- if an error occurs during the read of the filepublic MxParser(java.io.InputStream stream) throws java.io.IOException
stream
- non null stream containing a single unit of messagejava.io.IOException
public MxParser(java.lang.String message)
@Deprecated @ProwideDeprecated(phase2=SRU2021) public static BusinessHeader parseBusinessHeader(org.w3c.dom.Element e)
AppHdrParser.parse(Element)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public static AppHdr parseAppHdr(org.w3c.dom.Element e)
AppHdrParser.parse(Element)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public static com.prowidesoftware.swift.model.mx.dic.ApplicationHeader parseApplicationHeader(MxNode tree)
LegacyAppHdr.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public static com.prowidesoftware.swift.model.mx.dic.BusinessApplicationHeaderV01 parseBusinessApplicationHeaderV01(MxNode tree)
BusinessAppHdrV01.parse(String)
instead@ProwideDeprecated(phase2=SRU2021) @Deprecated public static java.lang.String getBICFromDN(java.lang.String dn)
MxParseUtils.getBICFromDN(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public MxNode parse()
MxNode.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public BusinessHeader parseBusinessHeader()
AppHdrParser.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public AppHdr parseAppHdr()
AppHdrParser.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public com.prowidesoftware.swift.model.mx.dic.ApplicationHeader parseApplicationHeader()
LegacyAppHdr.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public com.prowidesoftware.swift.model.mx.dic.BusinessApplicationHeaderV01 parseBusinessApplicationHeaderV01()
BusinessAppHdrV01.parse(String)
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public MxId detectMessage()
MxParseUtils.identifyMessage(String)
instead@Deprecated @ProwideDeprecated(phase4=SRU2021) public MxParser.MxStructureInfo analizeMessage()
analyzeMessage()
instead@Deprecated @ProwideDeprecated(phase2=SRU2021) public MxParser.MxStructureInfo analyzeMessage()
AbstractMX.parse(String)
can be used to parse any unknown message. If you just want to
detect the message type you can also use the MxParseUtils.identifyMessage(String)
This can be helpful when the actual content of an XML is unknown and some preprocessing of the XML must be done in order to parse or validate its content properly.
The implementation is intended to be lightweight and efficient, based on XMLStreamReader
If the message contains more than one Document element, the first one will be picked. The same applies for the header, only the first AppHdr will be picked
@Deprecated @ProwideDeprecated(phase2=SRU2021) public java.lang.String stripDocument()
AbstractMX.parse(String)
instead, and then use any of the document
serializer AbstractMX.document()
methodsThis API is convenient when only the Document element of an MX message is needed and the wrapper/payload structure is unknown.
This implementation is intended to be lightweight and efficient so it actually does a simple substring
operation on the XML using information provided by the result of analyzeMessage()
. The XML is not
converted into DOM on purpose because we want to strip the content event when the XML is not totally well-formed.
<
If the message contains more than one Document element the expected result is as follows:
@Deprecated @ProwideDeprecated(phase2=SRU2021) public java.lang.String stripHeader()
AbstractMX.parse(String)
instead, and then use any of the header
serializer AbstractMX.header()
methodsThis API is convenient when only the header element of an MX message is needed and the wrapper/payload structure is unknown.
To gather the header already parsed into objects see parseBusinessHeader()
This implementation is intended to be lightweight and efficient so it actually
does a simple substring operation on the XML using information provided
by the result of analyzeMessage()
. The XML is not converted into DOM.
If the message contains more than one AppHdr element the expected result is as follows: