org.alfresco.repo.dictionary
Class NamespaceDAOImpl

java.lang.Object
  extended by org.alfresco.repo.dictionary.NamespaceDAOImpl
All Implemented Interfaces:
NamespaceDAO, NamespacePrefixResolver

public class NamespaceDAOImpl
extends java.lang.Object
implements NamespaceDAO

Simple in-memory namespace DAO


Nested Class Summary
 class NamespaceDAOImpl.NamespaceRegistry
           
 
Constructor Summary
NamespaceDAOImpl()
           
 
Method Summary
 void addPrefix(java.lang.String prefix, java.lang.String uri)
          Add a namespace prefix
 void addURI(java.lang.String uri)
          Add a namespace URI
 void afterDictionaryInit()
          Complete the initialisation
 void destroy()
          Destroy the namespaces
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Gets the namespace URI registered for the given prefix
 java.util.Collection getPrefixes()
          Gets all registered Prefixes
 java.util.Collection getPrefixes(java.lang.String URI)
          Gets the registered prefixes for the given namespace URI
 java.util.Collection getURIs()
          Gets all registered Uris
 void init()
          Initialise empty namespaces
 void registerDictionary(DictionaryDAO dictionaryDAO)
          Register with the Dictionary
 void removePrefix(java.lang.String prefix)
          Remove a namspace prefix
 void removeURI(java.lang.String uri)
          Remove the specified URI
 void setNamespaceRegistryCache(SimpleCache namespaceRegistryCache)
           
 void setTenantService(TenantService tenantService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceDAOImpl

public NamespaceDAOImpl()
Method Detail

setTenantService

public void setTenantService(TenantService tenantService)

setNamespaceRegistryCache

public void setNamespaceRegistryCache(SimpleCache namespaceRegistryCache)

registerDictionary

public void registerDictionary(DictionaryDAO dictionaryDAO)
Description copied from interface: NamespaceDAO
Register with the Dictionary

Specified by:
registerDictionary in interface NamespaceDAO

afterDictionaryInit

public void afterDictionaryInit()
Complete the initialisation

Specified by:
afterDictionaryInit in interface NamespaceDAO

init

public void init()
Initialise empty namespaces

Specified by:
init in interface NamespaceDAO

destroy

public void destroy()
Destroy the namespaces

Specified by:
destroy in interface NamespaceDAO

getURIs

public java.util.Collection getURIs()
Description copied from interface: NamespacePrefixResolver
Gets all registered Uris

Specified by:
getURIs in interface NamespacePrefixResolver
Returns:
collection of all registered namespace uris

getPrefixes

public java.util.Collection getPrefixes()
Description copied from interface: NamespacePrefixResolver
Gets all registered Prefixes

Specified by:
getPrefixes in interface NamespacePrefixResolver
Returns:
collection of all registered namespace prefixes

addURI

public void addURI(java.lang.String uri)
Description copied from interface: NamespaceDAO
Add a namespace URI

Specified by:
addURI in interface NamespaceDAO
Parameters:
uri - the namespace uri to add

addPrefix

public void addPrefix(java.lang.String prefix,
                      java.lang.String uri)
Description copied from interface: NamespaceDAO
Add a namespace prefix

Specified by:
addPrefix in interface NamespaceDAO
Parameters:
prefix - the prefix
uri - the uri to prefix

removeURI

public void removeURI(java.lang.String uri)
Description copied from interface: NamespaceDAO
Remove the specified URI

Specified by:
removeURI in interface NamespaceDAO
Parameters:
uri - the uri to remove

removePrefix

public void removePrefix(java.lang.String prefix)
Description copied from interface: NamespaceDAO
Remove a namspace prefix

Specified by:
removePrefix in interface NamespaceDAO
Parameters:
prefix - the prefix to remove

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Description copied from interface: NamespacePrefixResolver
Gets the namespace URI registered for the given prefix

Specified by:
getNamespaceURI in interface NamespacePrefixResolver
Parameters:
prefix - prefix to lookup
Returns:
the namespace

getPrefixes

public java.util.Collection getPrefixes(java.lang.String URI)
Description copied from interface: NamespacePrefixResolver
Gets the registered prefixes for the given namespace URI

Specified by:
getPrefixes in interface NamespacePrefixResolver
Parameters:
URI - namespace URI to lookup
Returns:
the prefixes (or empty collection, if no prefixes registered against URI)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.