|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.xml.SimpleNamespaceContext
@ThreadSafe public class SimpleNamespaceContext
Simple implementation of NamespaceContext based on a map from prefix values to corresponding URIs. This
implementation only supports a single mapping for a given prefix, that is getPrefixes(String) will always
contain at most 1 element.
| Field Summary | |
|---|---|
private com.google.common.collect.ImmutableBiMap<String,String> |
mappings
Mappings between namespace prefixes and namespace URIs. |
| Constructor Summary | |
|---|---|
SimpleNamespaceContext()
Constructor. |
|
SimpleNamespaceContext(Map<String,String> prefixToUriMappings)
Constructor. |
|
| Method Summary | |
|---|---|
private com.google.common.collect.ImmutableBiMap.Builder<String,String> |
getMappingsBuilder()
Build the initial set of mappings which contains entries for XML and XMLNS. |
String |
getNamespaceURI(String prefix)
|
String |
getPrefix(String namespaceURI)
|
Iterator<String> |
getPrefixes(String namespaceURI)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final com.google.common.collect.ImmutableBiMap<String,String> mappings
| Constructor Detail |
|---|
public SimpleNamespaceContext()
public SimpleNamespaceContext(@Nullable@NullableElements
Map<String,String> prefixToUriMappings)
prefixToUriMappings - Maps prefix values to the corresponding namespace URIs.| Method Detail |
|---|
@Nullable
public String getNamespaceURI(@Nonnull
String prefix)
getNamespaceURI in interface NamespaceContext
@Nullable
public String getPrefix(@Nonnull
String namespaceURI)
getPrefix in interface NamespaceContext@Nonnull public Iterator<String> getPrefixes(String namespaceURI)
getPrefixes in interface NamespaceContext@Nonnull private com.google.common.collect.ImmutableBiMap.Builder<String,String> getMappingsBuilder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||