public class QNameCache extends Object
QNameCache
caches instances of QName
for reuse both across documents and within documents.
Modifier and Type | Field and Description |
---|---|
private DocumentFactory |
documentFactory
The document factory associated with new QNames instances in this cache
or null if no instances should be associated by default
|
protected Map |
namespaceCache
|
protected Map |
noNamespaceCache
Cache of
QName instances with no namespace |
Constructor and Description |
---|
QNameCache() |
QNameCache(DocumentFactory documentFactory) |
Modifier and Type | Method and Description |
---|---|
protected Map |
createMap()
A factory method
|
protected QName |
createQName(String name)
Factory method to create a new QName object
which can be overloaded to create derived QName instances
|
protected QName |
createQName(String name,
Namespace namespace)
Factory method to create a new QName object
which can be overloaded to create derived QName instances
|
protected QName |
createQName(String name,
Namespace namespace,
String qualifiedName)
Factory method to create a new QName object
which can be overloaded to create derived QName instances
|
QName |
get(String name) |
QName |
get(String name,
Namespace namespace) |
QName |
get(String localName,
Namespace namespace,
String qualifiedName) |
QName |
get(String qualifiedName,
String uri) |
protected Map |
getNamespaceCache(Namespace namespace) |
List |
getQNames()
Returns a list of all the QName instances currently used
|
QName |
intern(QName qname) |
protected Map noNamespaceCache
QName
instances with no namespaceprotected Map namespaceCache
private DocumentFactory documentFactory
public QNameCache()
public QNameCache(DocumentFactory documentFactory)
public QName get(String name, Namespace namespace)
public QName get(String localName, Namespace namespace, String qualifiedName)
public QName intern(QName qname)
protected Map getNamespaceCache(Namespace namespace)
protected QName createQName(String name)
protected QName createQName(String name, Namespace namespace)
protected QName createQName(String name, Namespace namespace, String qualifiedName)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses