|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.spi.commons.conversion.CachingNameResolver
public class CachingNameResolver
Name resolver decorator that uses a generational cache to speed up parsing and formatting of JCR names. Uncached names are resolved using the underlying decorated name resolver.
Constructor Summary | |
---|---|
CachingNameResolver(NameResolver resolver)
Creates a caching decorator for the given name resolver. |
|
CachingNameResolver(NameResolver resolver,
org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
Creates a caching decorator for the given name resolver. |
Method Summary | |
---|---|
String |
getJCRName(Name name)
Returns the prefixed JCR name for the given Name . |
Name |
getQName(String jcrName)
Returns a Name for the given prefixed JCR name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingNameResolver(NameResolver resolver, org.apache.jackrabbit.spi.commons.conversion.GenerationalCache cache)
resolver
- decorated name resolvercache
- generational cachepublic CachingNameResolver(NameResolver resolver)
resolver
- name resolverMethod Detail |
---|
public Name getQName(String jcrName) throws IllegalNameException, NamespaceException
Name
for the given prefixed JCR name. The name
is first looked up form the generational cache and the call gets
delegated to the decorated name resolver only if the cache misses.
getQName
in interface NameResolver
jcrName
- A JCR name String.
Name
object.
IllegalNameException
- if the JCR name format is invalid
NamespaceException
- if the namespace prefix can not be resolvedpublic String getJCRName(Name name) throws NamespaceException
Name
. The name
is first looked up form the generational cache and the call gets
delegated to the decorated name resolver only if the cache misses.
getJCRName
in interface NameResolver
name
- The name object.
prefix:localName
.
NamespaceException
- if the namespace URI can not be resolved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |