|
Oracle Beehive Java Content Repository Java API Reference Release 2 (2.0.1.7) E16653-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface OracleNamespaceRegistry
OracleNamespaceRegistry represents the global persistent namespace registry of the JCR Repository.
Each repository has a single, persistent namespace registry represented by the OracleNamespaceRegistry object, accessed through the method OracleWorkspace.getNamespaceRegistry().
OracleWorkspace.getNamespaceRegistry()| Method Summary | |
|---|---|
java.lang.String |
getPrefix(java.lang.String uri)Returns the prefix to which the given URI is mapped. |
java.lang.String[] |
getPrefixes()Returns an array holding all currently registered prefixes. |
java.lang.String |
getURI(java.lang.String prefix)Returns the URI to which the given prefix is mapped. |
java.lang.String[] |
getURIs()Returns an array holding all currently registered URIs. |
void |
registerNamespace(java.lang.String prefix, java.lang.String uri)Sets a one-to-one mapping between prefix and URI in the namespace registry of this repository in the associated session. |
void |
unregisterNamespace(java.lang.String prefix)Removes a namespace mapping from the registry in the associated Session. |
| Method Detail |
|---|
void registerNamespace(java.lang.String prefix,
java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
Sets a one-to-one mapping between prefix and URI in the namespace registry of this repository in the associated session.
Assigning a new prefix to a URI that already exists in the namespace registry erases the old prefix. In general, this can almost always be done, though to prevent particular remappings NamespaceException is thrown.
On the other hand, taking a prefix that is already assigned to a URI and re-assigning it to a new URI in effect unregisters that URI. Therefore, the same restrictions apply to this operation as to NamespaceRegistry.unregisterNamespace:
jcr, nt, mix, sv, xml, or the empty prefix) to a new URI will throw a NamespaceException.xml" (in any combination of case) will throw a NamespaceException.A RepositoryException is thrown if another error occurs.
registerNamespace in interface javax.jcr.NamespaceRegistryprefix - The prefix to be mapped.uri - The URI to be mapped.javax.jcr.NamespaceException - if an illegal attempt is made to register a mapping.javax.jcr.RepositoryException - if another error occurs.javax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.AccessDeniedException
void unregisterNamespace(java.lang.String prefix)
throws javax.jcr.NamespaceException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
Removes a namespace mapping from the registry in the associated Session.
The following restriction apply:
jcr, nt, mix, sv, xml or the empty namespace) will throw a NamespaceException.NamespaceException.unregisterNamespace in interface javax.jcr.NamespaceRegistryprefix - The prefix of the mapping to be removed.javax.jcr.NamespaceException - if an illegal attempt is made to remove a mapping. to unregister the namespace.javax.jcr.RepositoryException - if another error occurs.javax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.AccessDeniedException
java.lang.String[] getPrefixes()
throws javax.jcr.RepositoryException
getPrefixes in interface javax.jcr.NamespaceRegistryjavax.jcr.RepositoryException - if an error occurs.
java.lang.String[] getURIs()
throws javax.jcr.RepositoryException
getURIs in interface javax.jcr.NamespaceRegistryjavax.jcr.RepositoryException - if an error occurs.
java.lang.String getURI(java.lang.String prefix)
throws javax.jcr.NamespaceException,
javax.jcr.RepositoryException
getURI in interface javax.jcr.NamespaceRegistryprefix - a stringjavax.jcr.NamespaceException - if the prefix is unknown.javax.jcr.RepositoryException - is another error occurs
java.lang.String getPrefix(java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.RepositoryException
getPrefix in interface javax.jcr.NamespaceRegistryuri - a stringjavax.jcr.NamespaceException - if the URI is unknown.javax.jcr.RepositoryException - is another error occurs
|
Oracle Beehive Java Content Repository Java API Reference Release 2 (2.0.1.7) E16653-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||