org.xmlhammer.gui.xpath
Class NamespaceContextMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by org.xmlhammer.gui.xpath.NamespaceContextMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>, javax.xml.namespace.NamespaceContext

public class NamespaceContextMap
extends java.util.HashMap<java.lang.String,java.lang.String>
implements javax.xml.namespace.NamespaceContext

Implementation of the a Namespace Context as a HashMap.

Version:
$Revision: 1.3 $, $Date: 2006/05/13 10:25:24 $
Author:
Edwin Dankert
See Also:
Serialized Form

Constructor Summary
NamespaceContextMap()
           
 
Method Summary
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Get Namespace URI bound to a prefix in the current scope.
 java.lang.String getPrefix(java.lang.String namespaceURI)
          Return the prefix bound to the namespace uri, null if no prefix could be found.
 java.util.Iterator getPrefixes(java.lang.String namespaceURI)
          Return the list of prefixes bound to the namespace uri, null if no prefix could be found.
 
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

NamespaceContextMap

public NamespaceContextMap()
Method Detail

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Get Namespace URI bound to a prefix in the current scope.

Specified by:
getNamespaceURI in interface javax.xml.namespace.NamespaceContext
Parameters:
prefix - the namespace prefix.
Returns:
the URI found for the prefix.
See Also:
NamespaceContext.getNamespaceURI(java.lang.String)

getPrefix

public java.lang.String getPrefix(java.lang.String namespaceURI)
Return the prefix bound to the namespace uri, null if no prefix could be found.

Specified by:
getPrefix in interface javax.xml.namespace.NamespaceContext
Parameters:
namespaceURI - the namespace URI.
Returns:
the prefix found for the URI.
See Also:
NamespaceContext.getPrefix(java.lang.String)

getPrefixes

public java.util.Iterator getPrefixes(java.lang.String namespaceURI)
Return the list of prefixes bound to the namespace uri, null if no prefix could be found.

Specified by:
getPrefixes in interface javax.xml.namespace.NamespaceContext
Parameters:
namespaceURI - the namespace URI.
Returns:
the prefixs bound to the URI.
See Also:
NamespaceContext.getPrefix(java.lang.String)


Copyright 2005-2005-2008 Edwin Dankert. All Rights Reserved.