org.jasig.cas.client.util
Class MapNamespaceContext

java.lang.Object
  extended by org.jasig.cas.client.util.MapNamespaceContext
All Implemented Interfaces:
NamespaceContext

public class MapNamespaceContext
extends Object
implements NamespaceContext

Namespace context implementation backed by a map of XML prefixes to namespace URIs.

Since:
3.4
Author:
Marvin S. Addison

Constructor Summary
MapNamespaceContext(Map<String,String> namespaceMap)
          Creates a new instance from a map.
MapNamespaceContext(String... namespaceDeclarations)
          Creates a new instance from an array of namespace delcarations.
 
Method Summary
 String getNamespaceURI(String prefix)
           
 String getPrefix(String namespaceURI)
           
 Iterator getPrefixes(String namespaceURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapNamespaceContext

public MapNamespaceContext(String... namespaceDeclarations)
Creates a new instance from an array of namespace delcarations.

Parameters:
namespaceDeclarations - An array of namespace declarations of the form prefix->uri.

MapNamespaceContext

public MapNamespaceContext(Map<String,String> namespaceMap)
Creates a new instance from a map.

Parameters:
namespaceMap - Map of XML namespace prefixes (keys) to URIs (values).
Method Detail

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 getPrefixes(String namespaceURI)
Specified by:
getPrefixes in interface NamespaceContext


Copyright © 2006-2015 Jasig. All Rights Reserved.