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
Namespace context implementation that stores namespace bindings in a
Map.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdoGetNamespaceURI(String prefix) Get namespace URI bound to a prefix in the current scope.protected StringdoGetPrefix(String nsURI) Get prefix bound to namespace URI in the current scope.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
-
Constructor Details
-
MapBasedNamespaceContext
Constructor.- Parameters:
map- a map containing the (prefix, namespace URI) entries
-
-
Method Details
-
doGetNamespaceURI
Description copied from class:AbstractNamespaceContextGet 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:
doGetNamespaceURIin classAbstractNamespaceContext- Parameters:
prefix- prefix to look up- Returns:
- namespace URI bound to prefix in the current scope
-
doGetPrefix
Description copied from class:AbstractNamespaceContextGet 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:
doGetPrefixin classAbstractNamespaceContext- Parameters:
nsURI- URI of namespace to lookup- Returns:
- prefix bound to namespace URI in current context
-
doGetPrefixes
Description copied from class:AbstractNamespaceContextGet 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:
doGetPrefixesin classAbstractNamespaceContext- Parameters:
nsURI- URI of namespace to lookup- Returns:
- iterator for all prefixes bound to the namespace URI in the current scope
-