Package org.apache.axiom.util.namespace
Class AbstractNamespaceContext
- java.lang.Object
-
- org.apache.axiom.util.namespace.AbstractNamespaceContext
-
- All Implemented Interfaces:
NamespaceContext
- Direct Known Subclasses:
MapBasedNamespaceContext
,ScopedNamespaceContext
public abstract class AbstractNamespaceContext extends Object implements NamespaceContext
PartialNamespaceContext
implementation that takes care of the implicit namespace bindings (for thexml
andxmlns
prefixes) defined in theNamespaceContext
Javadoc.
-
-
Constructor Summary
Constructors Constructor Description AbstractNamespaceContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
doGetNamespaceURI(String prefix)
Get namespace URI bound to a prefix in the current scope.protected abstract String
doGetPrefix(String namespaceURI)
Get prefix bound to namespace URI in the current scope.protected abstract Iterator<String>
doGetPrefixes(String namespaceURI)
Get all prefixes bound to a namespace URI in the current scope.String
getNamespaceURI(String prefix)
String
getPrefix(String namespaceURI)
Iterator<String>
getPrefixes(String namespaceURI)
-
-
-
Method Detail
-
getNamespaceURI
public final String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI
in interfaceNamespaceContext
-
doGetNamespaceURI
protected abstract String doGetNamespaceURI(String prefix)
Get namespace URI bound to a prefix in the current scope. The contract of this method is the same asNamespaceContext.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 String getPrefix(String namespaceURI)
- Specified by:
getPrefix
in interfaceNamespaceContext
-
doGetPrefix
protected abstract String doGetPrefix(String namespaceURI)
Get prefix bound to namespace URI in the current scope. The contract of this method is the same asNamespaceContext.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 Iterator<String> getPrefixes(String namespaceURI)
- Specified by:
getPrefixes
in interfaceNamespaceContext
-
doGetPrefixes
protected abstract Iterator<String> doGetPrefixes(String namespaceURI)
Get all prefixes bound to a namespace URI in the current scope. The contract of this method is the same asNamespaceContext.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
-
-