net.esper.event.xml
Class BaseXMLEventType

java.lang.Object
  extended by net.esper.event.BaseConfigurableEventType
      extended by net.esper.event.xml.BaseXMLEventType
All Implemented Interfaces:
EventType
Direct Known Subclasses:
SchemaXMLEventType, SimpleXMLEventType

public abstract class BaseXMLEventType
extends BaseConfigurableEventType

Base class for XMLEventTypes. Using this class as EventType only allow preconfigured properties (normally via XPathPropertyGetter ). For "on the fly" property resolvers, use either SimpleXMLEventType or SchemaXMLEventType

Author:
pablo

Field Summary
protected  XPathNamespaceContext namespaceContext
          XPath namespace context.
 
Constructor Summary
BaseXMLEventType(ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM)
          Ctor.
 
Method Summary
protected  String[] doListPropertyNames()
          Subclasses must implement this to supply a list of valid property names.
 boolean equals(Object otherObj)
           
 ConfigurationEventTypeXMLDOM getConfigurationEventTypeXMLDOM()
          Returns the configuration XML for the XML type.
 Iterator<EventType> getDeepSuperTypes()
          Returns iterator over all super types to event type, going up the hierarchy and including all Java interfaces (and their extended interfaces) and superclasses as EventType instances.
protected  String getRootElementName()
          Returns the name of the root element.
 EventType[] getSuperTypes()
          Returns an array of event types that are super to this event type, from which this event type inherited event properties.
protected  XPathFactory getXPathFactory()
          Returns the XPath factory used.
 int hashCode()
           
protected  void setExplicitProperties(Collection<ConfigurationEventTypeXMLDOM.XPathPropertyDesc> explicitProperties)
          Set the preconfigured event properties resolved by XPath expression.
protected  void setNamespaceContext(XPathNamespaceContext namespaceContext)
          Sets the namespace context for use in XPath expression resolution.
 
Methods inherited from class net.esper.event.BaseConfigurableEventType
doResolvePropertyGetter, doResolvePropertyType, getGetter, getPropertyNames, getPropertyType, getUnderlyingType, isProperty, setExplicitProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespaceContext

protected XPathNamespaceContext namespaceContext
XPath namespace context.

Constructor Detail

BaseXMLEventType

public BaseXMLEventType(ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM)
Ctor.

Parameters:
configurationEventTypeXMLDOM - is the XML DOM configuration such as root element and schema names
Method Detail

getRootElementName

protected String getRootElementName()
Returns the name of the root element.

Returns:
root element name

setNamespaceContext

protected void setNamespaceContext(XPathNamespaceContext namespaceContext)
Sets the namespace context for use in XPath expression resolution.

Parameters:
namespaceContext - for XPath expressions

setExplicitProperties

protected void setExplicitProperties(Collection<ConfigurationEventTypeXMLDOM.XPathPropertyDesc> explicitProperties)
Set the preconfigured event properties resolved by XPath expression.

Parameters:
explicitProperties - are preconfigured event properties

getXPathFactory

protected XPathFactory getXPathFactory()
Returns the XPath factory used.

Returns:
XPath factory

getSuperTypes

public EventType[] getSuperTypes()
Description copied from interface: EventType
Returns an array of event types that are super to this event type, from which this event type inherited event properties.

For Java bean instances underlying the event this method returns the event types for all superclasses extended by the Java bean and all interfaces implemented by the Java bean.

Returns:
an array of event types

getDeepSuperTypes

public Iterator<EventType> getDeepSuperTypes()
Description copied from interface: EventType
Returns iterator over all super types to event type, going up the hierarchy and including all Java interfaces (and their extended interfaces) and superclasses as EventType instances.

Returns:
iterator of event types represeting all superclasses and implemented interfaces, all the way up to java.lang.Object but excluding java.lang.Object itself

doListPropertyNames

protected String[] doListPropertyNames()
Description copied from class: BaseConfigurableEventType
Subclasses must implement this to supply a list of valid property names.

Specified by:
doListPropertyNames in class BaseConfigurableEventType
Returns:
list of properties

getConfigurationEventTypeXMLDOM

public ConfigurationEventTypeXMLDOM getConfigurationEventTypeXMLDOM()
Returns the configuration XML for the XML type.

Returns:
config XML

equals

public boolean equals(Object otherObj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com