public class ConfigurationEventTypeAxiom
extends java.lang.Object
implements java.io.Serializable
Use this class to configure the engine for processing of Axiom OMNode objects that represent events and contain all the data for event properties used by statements.
Minimally required is the root element name which allows the engine to map the document to the event type that has been named in an EPL or pattern statement.
Event properties that are results of XPath expressions can be made known to the engine via this class. For XPath expressions that must refer to namespace prefixes those prefixes and their namespace name must be supplied to the engine. A default namespace can be supplied as well.
Modifier and Type | Class and Description |
---|---|
static class |
ConfigurationEventTypeAxiom.XPathPropertyDesc
Descriptor class for event properties that are resolved via XPath-expression.
|
Constructor and Description |
---|
ConfigurationEventTypeAxiom()
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addNamespacePrefix(java.lang.String prefix,
java.lang.String namespace)
Add a prefix and namespace name for use in XPath expressions refering to that prefix.
|
void |
addXPathProperty(java.lang.String name,
java.lang.String xpath,
javax.xml.namespace.QName type)
Adds an event property for which the engine uses the supplied XPath expression against
a DOM document node to resolve a property value.
|
void |
addXPathProperty(java.lang.String name,
java.lang.String xpath,
javax.xml.namespace.QName type,
java.lang.String castToType)
Adds an event property for which the engine uses the supplied XPath expression against
a DOM document node to resolve a property value.
|
java.lang.String |
getDefaultNamespace()
Returns the default namespace.
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespacePrefixes()
Returns the namespace prefixes in a map of prefix as key and namespace name as value.
|
java.lang.String |
getRootElementName()
Returns the root element name.
|
java.lang.String |
getRootElementNamespace()
Returns the root element namespace.
|
java.util.Map<java.lang.String,ConfigurationEventTypeAxiom.XPathPropertyDesc> |
getXPathProperties()
Returns a map of property name and descriptor for XPath-expression properties.
|
boolean |
isResolvePropertiesAbsolute()
Indicates whether properties are compiled into absolute or deep XPath expressions (see setter method for more detail).
|
void |
setDefaultNamespace(java.lang.String defaultNamespace)
Sets the default namespace.
|
void |
setResolvePropertiesAbsolute(boolean resolvePropertiesAbsolute)
When set to true (the default), indicates that when properties are compiled to XPath expressions that the
compilation should generate an absolute XPath expression such as "/getQuote/request" for the
simple request property, or "/getQuote/request/symbol" for a "request.symbol" nested property,
wherein the root element node is "getQuote".
|
void |
setRootElementName(java.lang.String rootElementName)
Sets the root element name.
|
void |
setRootElementNamespace(java.lang.String rootElementNamespace)
Sets the root element namespace.
|
public java.lang.String getRootElementName()
public void setRootElementName(java.lang.String rootElementName)
rootElementName
- is the name of the root elementpublic java.lang.String getRootElementNamespace()
public void setRootElementNamespace(java.lang.String rootElementNamespace)
rootElementNamespace
- is the namespace for the root elementpublic java.lang.String getDefaultNamespace()
public void setDefaultNamespace(java.lang.String defaultNamespace)
defaultNamespace
- is the default namespacepublic java.util.Map<java.lang.String,ConfigurationEventTypeAxiom.XPathPropertyDesc> getXPathProperties()
public void addXPathProperty(java.lang.String name, java.lang.String xpath, javax.xml.namespace.QName type)
name
- of the event propertyxpath
- is an arbitrary xpath expressiontype
- is a constant obtained from javax.xml.xpath.XPathConstants. Typical values are
XPathConstants.NUMBER, STRING and BOOLEAN.public void addXPathProperty(java.lang.String name, java.lang.String xpath, javax.xml.namespace.QName type, java.lang.String castToType)
name
- of the event propertyxpath
- is an arbitrary xpath expressiontype
- is a constant obtained from javax.xml.xpath.XPathConstants. Typical values are
XPathConstants.NUMBER, STRING and BOOLEAN.castToType
- is the type name of the type that the return value of the xpath expression is casted topublic java.util.Map<java.lang.String,java.lang.String> getNamespacePrefixes()
public void addNamespacePrefix(java.lang.String prefix, java.lang.String namespace)
prefix
- is the prefix of the namespacenamespace
- is the namespace namepublic boolean isResolvePropertiesAbsolute()
public void setResolvePropertiesAbsolute(boolean resolvePropertiesAbsolute)
When set to false, indicates that when properties are compiled to XPath expressions that the compilation should generate a deep XPath expression such as "//symbol" for the simple symbol property, or "//request/symbol" for a "request.symbol" nested property.
resolvePropertiesAbsolute
- true for absolute XPath for properties (default), false for deep XPath