public class NamespaceResolver extends Object implements Cloneable, Serializable
JXPathContextReferenceImpl
.Modifier and Type | Field and Description |
---|---|
protected HashMap |
namespaceMap
namespace map
|
protected NamespaceResolver |
parent
Parent NamespaceResolver
|
protected NodePointer |
pointer
pointer
|
protected HashMap |
reverseMap
reverse lookup map
|
Constructor and Description |
---|
NamespaceResolver()
Create a new NamespaceResolver.
|
NamespaceResolver(NamespaceResolver parent)
Create a new NamespaceResolver.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
protected String |
getExternallyRegisteredNamespaceURI(String prefix)
Given a prefix, returns an externally registered namespace URI.
|
protected String |
getExternallyRegisteredPrefix(String namespaceURI)
Get the nearest prefix found that matches an externally-registered namespace.
|
Pointer |
getNamespaceContextPointer()
Get the namespace context pointer.
|
String |
getNamespaceURI(String prefix)
Given a prefix, returns a registered namespace URI.
|
protected static String |
getPrefix(NodePointer pointer,
String namespaceURI)
Find the namespace prefix for the specified namespace URI and NodePointer.
|
String |
getPrefix(String namespaceURI)
Get the prefix associated with the specifed namespace URI.
|
boolean |
isSealed()
Learn whether this NamespaceResolver has been sealed.
|
void |
registerNamespace(String prefix,
String namespaceURI)
Registers a namespace prefix.
|
void |
seal()
Seal this
NamespaceResolver . |
void |
setNamespaceContextPointer(NodePointer pointer)
Register a namespace for the expression context.
|
protected final NamespaceResolver parent
protected HashMap namespaceMap
protected HashMap reverseMap
protected NodePointer pointer
public NamespaceResolver()
public NamespaceResolver(NamespaceResolver parent)
parent
- NamespaceResolverprotected static String getPrefix(NodePointer pointer, String namespaceURI)
pointer
- locationnamespaceURI
- to checkpublic void registerNamespace(String prefix, String namespaceURI)
prefix
- A namespace prefixnamespaceURI
- A URI for that prefixpublic void setNamespaceContextPointer(NodePointer pointer)
pointer
- the Pointer to set.public Pointer getNamespaceContextPointer()
public String getNamespaceURI(String prefix)
setNamespaceContextPointer
.prefix
- The namespace prefix to look upprotected String getExternallyRegisteredNamespaceURI(String prefix)
prefix
- The namespace prefix to look uppublic String getPrefix(String namespaceURI)
namespaceURI
- the ns URI to check.protected String getExternallyRegisteredPrefix(String namespaceURI)
namespaceURI
- the ns URI to check.public boolean isSealed()
public void seal()
NamespaceResolver
.Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.