org.dom4j.tree

Class NamespaceCache

public class NamespaceCache extends Object

NamespaceCache caches instances of DefaultNamespace for reuse both across documents and within documents.

Version: $Revision: 1.15 $

Author: James Strachan Maarten Coene Brett Finnell

Field Summary
protected static Mapcache
Cache of {@link Map}instances indexed by URI which contain caches of {@link Namespace}for each prefix
protected static MapnoPrefixCache
Cache of {@link Namespace}instances indexed by URI for default namespaces with no prefixes
Method Summary
protected NamespacecreateNamespace(String prefix, String uri)
A factory method to create {@link Namespace}instance
Namespaceget(String prefix, String uri)
DOCUMENT ME!
Namespaceget(String uri)
DOCUMENT ME!
protected MapgetURICache(String uri)
DOCUMENT ME!

Field Detail

cache

protected static Map cache
Cache of {@link Map}instances indexed by URI which contain caches of {@link Namespace}for each prefix

noPrefixCache

protected static Map noPrefixCache
Cache of {@link Namespace}instances indexed by URI for default namespaces with no prefixes

Method Detail

createNamespace

protected Namespace createNamespace(String prefix, String uri)
A factory method to create {@link Namespace}instance

Parameters: prefix DOCUMENT ME! uri DOCUMENT ME!

Returns: a newly created {@link Namespace}instance.

get

public Namespace get(String prefix, String uri)
DOCUMENT ME!

Parameters: prefix DOCUMENT ME! uri DOCUMENT ME!

Returns: the namespace for the given prefix and uri

get

public Namespace get(String uri)
DOCUMENT ME!

Parameters: uri DOCUMENT ME!

Returns: the name model for the given name and namepsace

getURICache

protected Map getURICache(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.

Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge