org.apache.axiom.util.namespace
Class AbstractNamespaceContext

java.lang.Object
  extended by org.apache.axiom.util.namespace.AbstractNamespaceContext
All Implemented Interfaces:
javax.xml.namespace.NamespaceContext
Direct Known Subclasses:
MapBasedNamespaceContext, ScopedNamespaceContext

public abstract class AbstractNamespaceContext
extends java.lang.Object
implements javax.xml.namespace.NamespaceContext

Partial NamespaceContext implementation that takes care of the implicit namespace bindings (for the xml and xmlns prefixes) defined in the NamespaceContext Javadoc.


Constructor Summary
AbstractNamespaceContext()
           
 
Method Summary
protected abstract  java.lang.String doGetNamespaceURI(java.lang.String prefix)
          Get namespace URI bound to a prefix in the current scope.
protected abstract  java.lang.String doGetPrefix(java.lang.String namespaceURI)
          Get prefix bound to namespace URI in the current scope.
protected abstract  java.util.Iterator doGetPrefixes(java.lang.String namespaceURI)
          Get all prefixes bound to a namespace URI in the current scope.
 java.lang.String getNamespaceURI(java.lang.String prefix)
           
 java.lang.String getPrefix(java.lang.String namespaceURI)
           
 java.util.Iterator getPrefixes(java.lang.String namespaceURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNamespaceContext

public AbstractNamespaceContext()
Method Detail

getNamespaceURI

public final java.lang.String getNamespaceURI(java.lang.String prefix)
Specified by:
getNamespaceURI in interface javax.xml.namespace.NamespaceContext

doGetNamespaceURI

protected abstract java.lang.String doGetNamespaceURI(java.lang.String prefix)
Get namespace URI bound to a prefix in the current scope. The contract of this method is the same as NamespaceContext.getNamespaceURI(String), except that the implementation is not required to handle the implicit namespace bindings.

Parameters:
prefix - prefix to look up
Returns:
namespace URI bound to prefix in the current scope

getPrefix

public final java.lang.String getPrefix(java.lang.String namespaceURI)
Specified by:
getPrefix in interface javax.xml.namespace.NamespaceContext

doGetPrefix

protected abstract java.lang.String doGetPrefix(java.lang.String namespaceURI)
Get prefix bound to namespace URI in the current scope. The contract of this method is the same as NamespaceContext.getPrefix(String), except that the implementation is not required to handle the implicit namespace bindings.

Parameters:
namespaceURI - URI of namespace to lookup
Returns:
prefix bound to namespace URI in current context

getPrefixes

public final java.util.Iterator getPrefixes(java.lang.String namespaceURI)
Specified by:
getPrefixes in interface javax.xml.namespace.NamespaceContext

doGetPrefixes

protected abstract java.util.Iterator doGetPrefixes(java.lang.String namespaceURI)
Get all prefixes bound to a namespace URI in the current scope. The contract of this method is the same as NamespaceContext.getPrefixes(String), except that the implementation is not required to handle the implicit namespace bindings.

Parameters:
namespaceURI - URI of namespace to lookup
Returns:
iterator for all prefixes bound to the namespace URI in the current scope


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