org.apache.jackrabbit.core.nodetype.xml
Class AdditionalNamespaceResolver

java.lang.Object
  extended by org.apache.jackrabbit.core.nodetype.xml.AdditionalNamespaceResolver
All Implemented Interfaces:
NamespaceResolver

public class AdditionalNamespaceResolver
extends Object
implements NamespaceResolver

A simple namespace resolver implementation, that uses the additional namespaces declared in an XML element.


Constructor Summary
AdditionalNamespaceResolver(NamespaceRegistry registry)
          Creates a namespace resolver using the namespaces declared in the given namespace registry.
AdditionalNamespaceResolver(Properties namespaces)
          Creates a namespace resolver using the namespaces defined in the given prefix-to-URI property set.
 
Method Summary
 String getPrefix(String uri)
          
 String getURI(String prefix)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdditionalNamespaceResolver

public AdditionalNamespaceResolver(Properties namespaces)
Creates a namespace resolver using the namespaces defined in the given prefix-to-URI property set.

Parameters:
namespaces - namespace properties

AdditionalNamespaceResolver

public AdditionalNamespaceResolver(NamespaceRegistry registry)
                            throws RepositoryException
Creates a namespace resolver using the namespaces declared in the given namespace registry.

Parameters:
registry - namespace registry
Throws:
RepositoryException - on repository errors
Method Detail

getURI

public String getURI(String prefix)
              throws NamespaceException

Specified by:
getURI in interface NamespaceResolver
Throws:
NamespaceException

getPrefix

public String getPrefix(String uri)
                 throws NamespaceException

Specified by:
getPrefix in interface NamespaceResolver
Throws:
NamespaceException


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