Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Returns the event body.
|
java.util.Map<java.lang.String,java.lang.String> |
getFilterableProperties()
Returns a name to value map of the filterable elements.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Returns a name to value map of the event headers including custom ones.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns a name to value map of the leaf elements.
|
void |
ignoreBodyRootName()
If enabled, the property names returned by
getProperties() or getFilterableProperties() will
not start with the body root element name. |
void |
parse(SchemaElementTree schemaDefinition,
java.lang.String event,
boolean validate)
Parses the event against the specified schema definition.
|
void |
setHeadersPrefix(java.lang.String prefix)
If specified, the header names returned by
getHeaders() will be prefixed with the specified value. |
void |
validate(SchemaElementTree schemaDefinition,
java.lang.String event)
Validates the provided event
content against the specified schemaDefinition . |
getSeparator, setSeparator
void setHeadersPrefix(java.lang.String prefix)
getHeaders()
will be prefixed with the specified value.prefix
- will be used to prefix header namesvoid ignoreBodyRootName()
getProperties()
or getFilterableProperties()
will
not start with the body root element name. Consider the following event body:<Body> <PartInventoryLow xmlns="http://namespaces.softwareag.com/EDA/WebM/Sample/InventoryMgmt/1.0"> <Part> <ItemID>itemID</ItemID> <ItemName>itemName</ItemName> <Model>model</Model> <Color>color</Color> <Shape>shape</Shape> </Part> <InventoryLevel>2</InventoryLevel> <DesiredInventoryLevel>1</DesiredInventoryLevel> </PartInventoryLow> </Body>The properties map entry corresponding to the
ItemID
element would be
Part$ItemID=itemID
instead of PartInventoryLow$Part$ItemID=itemID
.java.lang.String getBody()
java.util.Map<java.lang.String,java.lang.String> getHeaders()
java.util.Map<java.lang.String,java.lang.String> getProperties()
java.util.Map<java.lang.String,java.lang.String> getFilterableProperties()
void validate(SchemaElementTree schemaDefinition, java.lang.String event) throws EventParserException
content
against the specified schemaDefinition
. If the
validation fails, an EventParserException exception is thrown.schemaDefinition
- represents the XML schema of the event to be validatedevent
- content of the XML eventEventParserException
- gets thrown if the validation is unsuccessfulvoid parse(SchemaElementTree schemaDefinition, java.lang.String event, boolean validate) throws EventParserException
schemaDefinition
- represents the XML schema of the event to be parsedevent
- content of the XML eventvalidate
- enables validation of the XML event against the specified XML schema defnitionEventParserException