Package org.dom4j.tree
Class NamespaceCache
- java.lang.Object
-
- org.dom4j.tree.NamespaceCache
-
public class NamespaceCache extends java.lang.Object
NamespaceCache
caches instances ofDefaultNamespace
for reuse both across documents and within documents.- Version:
- $Revision: 1.15 $
- Author:
- James Strachan , Maarten Coene, Brett Finnell
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Map
cache
Cache ofMap
instances indexed by URI which contain caches ofNamespace
for each prefixprotected static java.util.Map
noPrefixCache
Cache ofNamespace
instances indexed by URI for default namespaces with no prefixes
-
Constructor Summary
Constructors Constructor Description NamespaceCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Namespace
createNamespace(java.lang.String prefix, java.lang.String uri)
A factory method to createNamespace
instanceNamespace
get(java.lang.String uri)
DOCUMENT ME!Namespace
get(java.lang.String prefix, java.lang.String uri)
DOCUMENT ME!protected java.util.Map
getURICache(java.lang.String uri)
DOCUMENT ME!protected static java.util.Map
newConcurrentHashMap()
-
-
-
Method Detail
-
newConcurrentHashMap
protected static java.util.Map newConcurrentHashMap()
-
get
public Namespace get(java.lang.String prefix, java.lang.String uri)
DOCUMENT ME!- Parameters:
prefix
- DOCUMENT ME!uri
- DOCUMENT ME!- Returns:
- the namespace for the given prefix and uri
-
get
public Namespace get(java.lang.String uri)
DOCUMENT ME!- Parameters:
uri
- DOCUMENT ME!- Returns:
- the name model for the given name and namepsace
-
getURICache
protected java.util.Map getURICache(java.lang.String uri)
DOCUMENT ME!- Parameters:
uri
- DOCUMENT ME!- Returns:
- the cache for the given namespace URI. If one does not currently exist it is created.
-
-