Package org.apache.axiom.util.namespace
Class MapBasedNamespaceContext
- java.lang.Object
-
- org.apache.axiom.util.namespace.AbstractNamespaceContext
-
- org.apache.axiom.util.namespace.MapBasedNamespaceContext
-
- All Implemented Interfaces:
NamespaceContext
public class MapBasedNamespaceContext extends AbstractNamespaceContext
Namespace context implementation that stores namespace bindings in aMap
.
-
-
Constructor Summary
Constructors Constructor Description MapBasedNamespaceContext(Map<String,String> map)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doGetNamespaceURI(String prefix)
Get namespace URI bound to a prefix in the current scope.protected String
doGetPrefix(String nsURI)
Get prefix bound to namespace URI in the current scope.protected Iterator<String>
doGetPrefixes(String nsURI)
Get all prefixes bound to a namespace URI in the current scope.-
Methods inherited from class org.apache.axiom.util.namespace.AbstractNamespaceContext
getNamespaceURI, getPrefix, getPrefixes
-
-
-
-
Method Detail
-
doGetNamespaceURI
protected String doGetNamespaceURI(String prefix)
Description copied from class:AbstractNamespaceContext
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.- Specified by:
doGetNamespaceURI
in classAbstractNamespaceContext
- Parameters:
prefix
- prefix to look up- Returns:
- namespace URI bound to prefix in the current scope
-
doGetPrefix
protected String doGetPrefix(String nsURI)
Description copied from class:AbstractNamespaceContext
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.- Specified by:
doGetPrefix
in classAbstractNamespaceContext
- Parameters:
nsURI
- URI of namespace to lookup- Returns:
- prefix bound to namespace URI in current context
-
doGetPrefixes
protected Iterator<String> doGetPrefixes(String nsURI)
Description copied from class:AbstractNamespaceContext
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.- Specified by:
doGetPrefixes
in classAbstractNamespaceContext
- Parameters:
nsURI
- URI of namespace to lookup- Returns:
- iterator for all prefixes bound to the namespace URI in the current scope
-
-