org.inria.ns.reflex.xml.provider.jaxen
Class JaxenXPathContext

java.lang.Object
  extended by org.inria.ns.reflex.xml.xpath.XPathContext.Impl
      extended by org.inria.ns.reflex.xml.provider.jaxen.JaxenXPathContext
All Implemented Interfaces:
PatternContext, XPathContext

public class JaxenXPathContext
extends XPathContext.Impl

XPath contexts are needed when executing an XPath expression to retrieve particularly variable values, functions and resolve namespace URIs. This implementation is backed by Jaxen.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.xml.xpath.XPathContext
XPathContext.Impl
 
Constructor Summary
JaxenXPathContext(PatternContext context)
          Construct a new context mapped on the given context.
JaxenXPathContext(XPathContext context)
          Construct a new context mapped on the given context.
 
Method Summary
static JaxenXPathContext getJaxenXPathContext(Context context)
          Return the JaxenXPathContext backed by the given jaxen context.
 org.inria.ns.reflex.xml.provider.jaxen.JaxenXPathContext.NativeJaxenContext getNativeJaxenContext()
          Return a native Jaxen context backed by this neutral XPath context.
 
Methods inherited from class org.inria.ns.reflex.xml.xpath.XPathContext.Impl
getNamespaceContext, getNodeSet, getPosition, getSize, getXFactory, getXPathFunctionResolver, getXPathVariableResolver, setNamespaceContext, setNodeSet, setPosition, setSize, setXPathFunctionResolver, setXPathVariableResolver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxenXPathContext

public JaxenXPathContext(XPathContext context)
Construct a new context mapped on the given context.

Parameters:
context - The context to wrap.

JaxenXPathContext

public JaxenXPathContext(PatternContext context)
Construct a new context mapped on the given context.

Parameters:
context - The context to wrap.
Method Detail

getNativeJaxenContext

public org.inria.ns.reflex.xml.provider.jaxen.JaxenXPathContext.NativeJaxenContext getNativeJaxenContext()
Return a native Jaxen context backed by this neutral XPath context.

Returns:
The native Jaxen context.

getJaxenXPathContext

public static JaxenXPathContext getJaxenXPathContext(Context context)
Return the JaxenXPathContext backed by the given jaxen context.

Parameters:
context - The jaxen context that must be built from a JaxenXPathContext.
Returns:
The underlying JaxenXPathContext.
Throws:
ClassCastException - If the context or its inner context support is not made of RefleX's classes.