|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.name.AbstractNamespaceResolver
org.apache.jackrabbit.core.NamespaceRegistryImpl
public class NamespaceRegistryImpl
A NamespaceRegistryImpl ...
| Constructor Summary | |
|---|---|
protected |
NamespaceRegistryImpl(FileSystem nsRegStore)
Protected constructor: Constructs a new instance of this class. |
| Method Summary | |
|---|---|
void |
cacheName(String jcrName,
QName name)
Puts a name into the cache. |
void |
evictAllNames()
Evicts all names from the cache, i.e. |
void |
externalRemap(String oldPrefix,
String newPrefix,
String uri)
Called when a namespace has been externally remapped. |
NameResolver |
getNameResolver()
|
PathResolver |
getPathResolver()
|
String |
getPrefix(String uri)
Returns the prefix which is mapped to the given URI. |
String[] |
getPrefixes()
|
String |
getUniquePrefix(String uriHint)
Returns a prefix that is unique among the already registered prefixes. |
String |
getURI(int idx)
Returns the URI for a given index (i.e. |
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped. |
int |
getURIIndex(String uri)
Returns the index (i.e. |
String[] |
getURIs()
|
void |
registerNamespace(String prefix,
String uri)
|
String |
retrieveName(QName name)
Retrieves a jcr name from the cache for the given qualified name. |
QName |
retrieveName(String jcrName)
Retrieves a qualified name from the cache for the given jcr name. |
void |
safeRegisterNamespace(String prefixHint,
String uri)
Registers a namespace using the given prefix hint. |
void |
setEventChannel(NamespaceEventChannel eventChannel)
Set an event channel to inform about changes. |
void |
unregisterNamespace(String prefix)
|
| Methods inherited from class org.apache.jackrabbit.name.AbstractNamespaceResolver |
|---|
addListener, getJCRName, getQName, notifyNamespaceAdded, notifyNamespaceRemapped, notifyNamespaceRemoved, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected NamespaceRegistryImpl(FileSystem nsRegStore)
throws RepositoryException
nsRegStore -
RepositoryException| Method Detail |
|---|
public NameResolver getNameResolver()
public PathResolver getPathResolver()
public String getUniquePrefix(String uriHint)
uriHint - namespace uri that serves as hint for the prefix generation
public void safeRegisterNamespace(String prefixHint,
String uri)
throws NamespaceException,
RepositoryException
prefixHint - the prefix hinturi - the namespace URI
NamespaceException - if an illegal attempt is made to register
a mapping
RepositoryException - if an unexpected error occursregisterNamespace(String, String)public void setEventChannel(NamespaceEventChannel eventChannel)
eventChannel - event channel
public int getURIIndex(String uri)
throws NamespaceException
uri - the uri to retrieve the index for
NamespaceException - if the URI is not registered.
public String getURI(int idx)
throws NamespaceException
idx - the index to retrieve the uri for.
NamespaceException - if the URI is not registered.
public void registerNamespace(String prefix,
String uri)
throws NamespaceException,
UnsupportedRepositoryOperationException,
AccessDeniedException,
RepositoryException
registerNamespace in interface NamespaceRegistryNamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
public void unregisterNamespace(String prefix)
throws NamespaceException,
UnsupportedRepositoryOperationException,
AccessDeniedException,
RepositoryException
unregisterNamespace in interface NamespaceRegistryNamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
public String[] getPrefixes()
throws RepositoryException
getPrefixes in interface NamespaceRegistryRepositoryException
public String[] getURIs()
throws RepositoryException
getURIs in interface NamespaceRegistryRepositoryException
public String getURI(String prefix)
throws NamespaceException
getURI in interface NamespaceRegistrygetURI in interface NamespaceResolverprefix - namespace prefix
NamespaceException - if the prefix is unknown.
public String getPrefix(String uri)
throws NamespaceException
getPrefix in interface NamespaceRegistrygetPrefix in interface NamespaceResolveruri - namespace URI
NamespaceException - if the URI is unknown.public QName retrieveName(String jcrName)
null is returned.
retrieveName in interface NameCachejcrName - the jcr name
nullpublic String retrieveName(QName name)
NameCachenull is returned.
retrieveName in interface NameCachename - the qualified name
null
public void cacheName(String jcrName,
QName name)
NameCache
cacheName in interface NameCachejcrName - the jcr namename - the qualified namepublic void evictAllNames()
NameCache
evictAllNames in interface NameCache
public void externalRemap(String oldPrefix,
String newPrefix,
String uri)
throws RepositoryException
externalRemap in interface NamespaceEventListeneroldPrefix - old prefix. if null this is a fresh mappingnewPrefix - new prefix. if null this is an unmap operationuri - uri to map prefix to
RepositoryException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||