org.apache.axiom.om.xpath
Class AXIOMXPath

java.lang.Object
  extended by org.jaxen.BaseXPath
      extended by org.apache.axiom.om.xpath.AXIOMXPath
All Implemented Interfaces:
java.io.Serializable, org.jaxen.XPath

public class AXIOMXPath
extends org.jaxen.BaseXPath

See Also:
Serialized Form

Field Summary
private  java.util.Map namespaces
           
private static long serialVersionUID
           
 
Constructor Summary
AXIOMXPath(java.lang.String xpathExpr)
          Construct given an XPath expression string.
 
Method Summary
 void addNamespace(java.lang.String prefix, java.lang.String uri)
          This override captures any added namespaces, as the Jaxen BaseXPath class nor NamespaceContext (or SimpleNamespaceContext) exposes thier internal map of the prefixes to the namespaces.
 java.util.Map getNamespaces()
          Expose the prefix to namespace mapping for this expression
 
Methods inherited from class org.jaxen.BaseXPath
booleanValueOf, createFunctionContext, createNamespaceContext, createVariableContext, debug, evaluate, getContext, getContextSupport, getFunctionContext, getNamespaceContext, getNavigator, getRootExpr, getVariableContext, numberValueOf, selectNodes, selectNodesForContext, selectSingleNode, selectSingleNodeForContext, setFunctionContext, setNamespaceContext, setVariableContext, stringValueOf, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

namespaces

private java.util.Map namespaces
Constructor Detail

AXIOMXPath

public AXIOMXPath(java.lang.String xpathExpr)
           throws org.jaxen.JaxenException
Construct given an XPath expression string.

Parameters:
xpathExpr - the XPath expression.
Throws:
org.jaxen.JaxenException - if there is a syntax error while parsing the expression
Method Detail

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String uri)
                  throws org.jaxen.JaxenException
This override captures any added namespaces, as the Jaxen BaseXPath class nor NamespaceContext (or SimpleNamespaceContext) exposes thier internal map of the prefixes to the namespaces. This method - although is not the ideal solution to the issue, attempts to provide an override to changing the Jaxen code.

Specified by:
addNamespace in interface org.jaxen.XPath
Overrides:
addNamespace in class org.jaxen.BaseXPath
Parameters:
prefix - a namespace prefix
uri - the URI to which the prefix matches
Throws:
org.jaxen.JaxenException - if the underlying implementation throws an exception

getNamespaces

public java.util.Map getNamespaces()
Expose the prefix to namespace mapping for this expression

Returns:
a Map of namespace prefixes to the URIs