org.apache.commons.jxpath.ri
Class NamespaceResolver
java.lang.Object
org.apache.commons.jxpath.ri.NamespaceResolver
- All Implemented Interfaces:
- java.lang.Cloneable
- public class NamespaceResolver
- extends java.lang.Object
- implements java.lang.Cloneable
The reference implementation of JXPathContext.
- Version:
- $Revision: 1.2 $ $Date: 2004/06/29 22:57:20 $
- Author:
- Dmitri Plotnikov
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
namespaceMap
protected java.util.HashMap namespaceMap
reverseMap
protected java.util.HashMap reverseMap
pointer
protected NodePointer pointer
sealed
private boolean sealed
NamespaceResolver
public NamespaceResolver()
registerNamespace
public void registerNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
- Registers a namespace prefix.
- Parameters:
prefix
- A namespace prefixnamespaceURI
- A URI for that prefix
setNamespaceContextPointer
public void setNamespaceContextPointer(NodePointer pointer)
- Register a namespace for the expression context.
getNamespaceContextPointer
public Pointer getNamespaceContextPointer()
getNamespaceURI
public java.lang.String getNamespaceURI(java.lang.String prefix)
- Given a prefix, returns a registered namespace URI. If the requested
prefix was not defined explicitly using the registerNamespace method,
JXPathContext will then check the context node to see if the prefix is
defined there. See
setNamespaceContextPointer
.
- Parameters:
prefix
- The namespace prefix to look up
- Returns:
- namespace URI or null if the prefix is undefined.
getPrefix
public java.lang.String getPrefix(java.lang.String namespaceURI)
isSealed
public boolean isSealed()
seal
public void seal()
clone
public java.lang.Object clone()