org.alfresco.service.namespace
Interface NamespacePrefixResolver

All Known Subinterfaces:
NamespaceDAO, NamespaceService
All Known Implementing Classes:
DictionaryNamespaceComponent, DynamicNamespacePrefixResolver, NamespaceDAOImpl, NamespaceServiceMemoryImpl

public interface NamespacePrefixResolver

The NamespacePrefixResolver provides a mapping between namespace prefixes and namespace URIs.


Method Summary
 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 namespaceURI)
          Gets the registered prefixes for the given namespace URI
 java.util.Collection getURIs()
          Gets all registered Uris
 

Method Detail

getNamespaceURI

@Auditable(parameters="prefix")
java.lang.String getNamespaceURI(java.lang.String prefix)
                                 throws NamespaceException
Gets the namespace URI registered for the given prefix

Parameters:
prefix - prefix to lookup
Returns:
the namespace
Throws:
NamespaceException - if prefix has not been registered

getPrefixes

@Auditable(parameters="namespaceURI")
java.util.Collection getPrefixes(java.lang.String namespaceURI)
                                 throws NamespaceException
Gets the registered prefixes for the given namespace URI

Parameters:
namespaceURI - namespace URI to lookup
Returns:
the prefixes (or empty collection, if no prefixes registered against URI)
Throws:
NamespaceException - if URI has not been registered

getPrefixes

@Auditable
java.util.Collection getPrefixes()
Gets all registered Prefixes

Returns:
collection of all registered namespace prefixes

getURIs

@Auditable
java.util.Collection getURIs()
Gets all registered Uris

Returns:
collection of all registered namespace uris


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