org.apache.jackrabbit.rmi.client
Class ClientNamespaceRegistry

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientObject
      extended by org.apache.jackrabbit.rmi.client.ClientNamespaceRegistry
All Implemented Interfaces:
NamespaceRegistry

public class ClientNamespaceRegistry
extends ClientObject
implements NamespaceRegistry

Local adapter for the JCR-RMI RemoteNamespaceRegistry interface. This class makes a remote namespace registry locally available using the JCR NamespaceRegistry interface.

See Also:
NamespaceRegistry, RemoteNamespaceRegistry

Field Summary
 
Fields inherited from interface javax.jcr.NamespaceRegistry
NAMESPACE_EMPTY, NAMESPACE_JCR, NAMESPACE_MIX, NAMESPACE_NT, NAMESPACE_XML, PREFIX_EMPTY, PREFIX_JCR, PREFIX_MIX, PREFIX_NT, PREFIX_XML
 
Constructor Summary
ClientNamespaceRegistry(RemoteNamespaceRegistry remote, LocalAdapterFactory factory)
          Creates a local adapter for the given remote namespace registry.
 
Method Summary
 String getPrefix(String uri)
          
 String[] getPrefixes()
          
 String getURI(String prefix)
          
 String[] getURIs()
          
 void registerNamespace(String prefix, String uri)
          
 void unregisterNamespace(String prefix)
          
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientObject
getFactory, getItem, getNode, getNodeTypeArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientNamespaceRegistry

public ClientNamespaceRegistry(RemoteNamespaceRegistry remote,
                               LocalAdapterFactory factory)
Creates a local adapter for the given remote namespace registry.

Parameters:
remote - remote namespace registry
factory - local adapter factory
Method Detail

registerNamespace

public void registerNamespace(String prefix,
                              String uri)
                       throws RepositoryException

Specified by:
registerNamespace in interface NamespaceRegistry
Throws:
RepositoryException

unregisterNamespace

public void unregisterNamespace(String prefix)
                         throws RepositoryException

Specified by:
unregisterNamespace in interface NamespaceRegistry
Throws:
RepositoryException

getPrefixes

public String[] getPrefixes()
                     throws RepositoryException

Specified by:
getPrefixes in interface NamespaceRegistry
Throws:
RepositoryException

getURIs

public String[] getURIs()
                 throws RepositoryException

Specified by:
getURIs in interface NamespaceRegistry
Throws:
RepositoryException

getURI

public String getURI(String prefix)
              throws RepositoryException

Specified by:
getURI in interface NamespaceRegistry
Throws:
RepositoryException

getPrefix

public String getPrefix(String uri)
                 throws RepositoryException

Specified by:
getPrefix in interface NamespaceRegistry
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.