net.esper.event.xml
Class XPathPropertyGetter

java.lang.Object
  extended by net.esper.event.xml.XPathPropertyGetter
All Implemented Interfaces:
EventPropertyGetter, TypedEventPropertyGetter

public class XPathPropertyGetter
extends java.lang.Object
implements TypedEventPropertyGetter

Getter for properties of DOM xml events.

Author:
pablo

Constructor Summary
XPathPropertyGetter(java.lang.String propertyName, javax.xml.xpath.XPathExpression xPathExpression, javax.xml.namespace.QName resultType)
          Ctor.
 
Method Summary
 java.lang.Object get(EventBean eventBean)
          Return the value for the property in the event object specified when the instance was obtained.
 java.lang.Class getResultClass()
          Returns type of event property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathPropertyGetter

public XPathPropertyGetter(java.lang.String propertyName,
                           javax.xml.xpath.XPathExpression xPathExpression,
                           javax.xml.namespace.QName resultType)
Ctor.

Parameters:
propertyName - is the name of the event property for which this getter gets values
xPathExpression - is a compile XPath expression
resultType - is the resulting type
Method Detail

get

public java.lang.Object get(EventBean eventBean)
                     throws PropertyAccessException
Description copied from interface: EventPropertyGetter
Return the value for the property in the event object specified when the instance was obtained. Useful for fast access to event properties. Throws a PropertyAccessException if the getter instance doesn't match the EventType it was obtained from, and to indicate other property access problems.

Specified by:
get in interface EventPropertyGetter
Parameters:
eventBean - is the event to get the value of a property from
Returns:
value of property in event
Throws:
PropertyAccessException - to indicate that property access failed

getResultClass

public java.lang.Class getResultClass()
Description copied from interface: TypedEventPropertyGetter
Returns type of event property.

Specified by:
getResultClass in interface TypedEventPropertyGetter
Returns:
class of the objects returned by this getter