Package org.hl7.fhir.utilities.xml
Class NamespaceContextMap
- java.lang.Object
-
- org.hl7.fhir.utilities.xml.NamespaceContextMap
-
public final class NamespaceContextMap extends Object
An implementation of NamespaceContext . Instances are immutable.- Author:
- McDowell
-
-
Constructor Summary
Constructors Constructor Description NamespaceContextMap(String... mappingPairs)
Convenience constructor.NamespaceContextMap(Map<String,String> prefixMappings)
Constructor that takes a map of XML prefix-namespaceURI values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getMap()
String
getNamespaceURI(String prefix)
String
getPrefix(String namespaceURI)
Iterator<String>
getPrefixes(String namespaceURI)
-
-
-
Constructor Detail
-
NamespaceContextMap
public NamespaceContextMap(Map<String,String> prefixMappings)
Constructor that takes a map of XML prefix-namespaceURI values. A defensive copy is made of the map. An IllegalArgumentException will be thrown if the map attempts to remap the standard prefixes defined in the NamespaceContext contract.- Parameters:
prefixMappings
- a map of prefix:namespaceURI values
-
NamespaceContextMap
public NamespaceContextMap(String... mappingPairs)
Convenience constructor.- Parameters:
mappingPairs
- pairs of prefix-namespaceURI values
-
-
Method Detail
-
getNamespaceURI
public String getNamespaceURI(String prefix)
-
getPrefixes
public Iterator<String> getPrefixes(String namespaceURI)
-
-