@NotThreadSafe public class MapBasedNamespaceContext extends AbstractNamespaceContext
| Constructor and Description |
|---|
MapBasedNamespaceContext() |
| Modifier and Type | Method and Description |
|---|---|
MapBasedNamespaceContext |
addMapping(String sPrefix,
String sNamespaceURI)
Add a new prefix to namespace mapping.
|
boolean |
equals(Object o) |
String |
getCustomNamespaceURI(String sPrefix) |
String |
getCustomPrefix(String sNamespaceURI) |
Iterator<String> |
getCustomPrefixes(String sNamespaceURI) |
String |
getDefaultNamespaceURI() |
int |
getMappingCount() |
Map<String,String> |
getPrefixToNamespaceURIMap()
Get all contained mappings.
|
boolean |
hasAnyMapping() |
int |
hashCode() |
EChange |
removeMapping(String sPrefix) |
MapBasedNamespaceContext |
setDefaultNamespaceURI(String sNamespaceURI)
Set the default namespace URL
|
String |
toString() |
getNamespaceURI, getPrefix, getPrefixes@Nullable public String getDefaultNamespaceURI()
getDefaultNamespaceURI in class AbstractNamespaceContext@Nonnull public MapBasedNamespaceContext setDefaultNamespaceURI(@Nonnull String sNamespaceURI)
sNamespaceURI - The namespace URI to be used as the default. May not be
null but maybe empty.@Nonnull public MapBasedNamespaceContext addMapping(@Nonnull String sPrefix, @Nonnull String sNamespaceURI)
sPrefix - The prefix to be used. May not be null. If it equals
XMLConstants.DEFAULT_NS_PREFIX that the namespace is
considered to be the default one.sNamespaceURI - The namespace URI to be mapped. May not be null but
maybe empty.@Nullable public Iterator<String> getCustomPrefixes(@Nonnull String sNamespaceURI)
getCustomPrefixes in class AbstractNamespaceContext@Nullable public String getCustomPrefix(@Nonnull String sNamespaceURI)
getCustomPrefix in class AbstractNamespaceContext@Nullable public String getCustomNamespaceURI(@Nonnull String sPrefix)
getCustomNamespaceURI in class AbstractNamespaceContext@Nonnull @ReturnsMutableCopy public Map<String,String> getPrefixToNamespaceURIMap()
IIterableNamespaceContextpublic boolean hasAnyMapping()
@Nonnegative public int getMappingCount()
Copyright © 2014–2015 Philip Helger. All rights reserved.