org.apache.ws.commons.schema.utils
Class NamespaceMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by org.apache.ws.commons.schema.utils.NamespaceMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, NamespaceContext, NamespacePrefixList

public class NamespaceMap
extends HashMap<String,Object>
implements NamespacePrefixList

This class maps from a prefix to an object that is either a String or a URI. In fact, it will work with anything with a toString result that is useful as a namespace URI.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
NamespaceMap()
           
NamespaceMap(Map<String,Object> map)
           
 
Method Summary
 void add(String prefix, String namespaceURI)
           
 String[] getDeclaredPrefixes()
          Returns the list of currently defined namespace prefixes.
 String getNamespaceURI(String prefix)
           
 String getPrefix(String namespaceURI)
           
 Iterator<String> getPrefixes(String namespaceURI)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

NamespaceMap

public NamespaceMap()

NamespaceMap

public NamespaceMap(Map<String,Object> map)
Method Detail

add

public void add(String prefix,
                String namespaceURI)

getDeclaredPrefixes

public String[] getDeclaredPrefixes()
Description copied from interface: NamespacePrefixList
Returns the list of currently defined namespace prefixes.

Specified by:
getDeclaredPrefixes in interface NamespacePrefixList

getNamespaceURI

public String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface NamespaceContext

getPrefix

public String getPrefix(String namespaceURI)
Specified by:
getPrefix in interface NamespaceContext

getPrefixes

public Iterator<String> getPrefixes(String namespaceURI)
Specified by:
getPrefixes in interface NamespaceContext


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