public interface AppHdr
When the header is used, its AppHdr element is a sibling of the Document element containing the specific message type content. The parent wrapper structure that holds the AppHdr and Document is implementation/network specific and not part of the scope of this model and parser. As for the AppHdr there are at the moment two main specifications:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HEADER_LOCALNAME |
| Modifier and Type | Method and Description |
|---|---|
javax.xml.datatype.XMLGregorianCalendar |
creationDate()
Gets the message creation date from the "CreDate" (BAH) or "CrDate" (AH) element.
|
boolean |
duplicate()
Gets the duplicate flag from the "PssblDplct" (BAH) or "Dup" (AH) element
|
org.w3c.dom.Element |
element()
Gets the header as an Element object.
|
java.lang.String |
from()
Gets the header sender form the "Fr" element.
|
java.lang.String |
messageName()
Gets the message name from the "MsgDefIdr" (BAH) or "MsgName" (AH) element.
|
java.lang.String |
reference()
Gets the message reference from the "BizMsgIdr" (BAH) or "MsgRef" (AH) element.
|
java.lang.String |
serviceName()
Gets the service name from the "BizSvc" (BAH) or "SvcName" (AH) element.
|
void |
setCreationDate(boolean overwrite)
Sets the creation date in the header object with current moment in UTC time zone.
|
java.lang.String |
to()
Gets the header receiver form the "To" element.
|
default java.lang.String |
xml()
Get this header as an XML string.
|
java.lang.String |
xml(java.lang.String prefix,
boolean includeXMLDeclaration)
Get this header as an XML string.
|
static final java.lang.String HEADER_LOCALNAME
java.lang.String from()
The From element is used for the identification of the sender, whether as a BIC, a name and address, a proprietary identification or a Uniform Resource Identifier (URI).
java.lang.String to()
The To element is used for identification of the receiver, whether as a BIC, a name and address, a proprietary identification or a Uniform Resource Identifier (URI).
java.lang.String reference()
java.lang.String messageName()
java.lang.String serviceName()
boolean duplicate()
javax.xml.datatype.XMLGregorianCalendar creationDate()
void setCreationDate(boolean overwrite)
overwrite - if true, the creation date will always be set overwriting any previous value;
if false it will be set only if it is not already setdefault java.lang.String xml()
The implementation uses xml(String, boolean) with no prefix and no XML declaration.
java.lang.String xml(java.lang.String prefix,
boolean includeXMLDeclaration)
prefix - optional prefix for namespace (empty by default)includeXMLDeclaration - true to include the XML declaration (false by default)org.w3c.dom.Element element()