@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.
|
protected String |
getCustomNamespaceURI(String sPrefix) |
protected String |
getCustomPrefix(String sNamespaceURI) |
protected Iterator<String> |
getCustomPrefixes(String sNamespaceURI) |
String |
getDefaultNamespaceURI() |
int |
getMappingCount() |
Map<String,String> |
getPrefixToNamespaceURIMap()
Get all contained mappings.
|
boolean |
hasAnyMapping() |
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@Nonempty String sNamespaceURI)
sNamespaceURI - The namespace URI to be used as the default. May neither be
null nor empty.@Nonnull public MapBasedNamespaceContext addMapping(@Nonnull String sPrefix, @Nonnull@Nonempty 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 neither be null nor
empty.@Nullable protected Iterator<String> getCustomPrefixes(@Nonnull String sNamespaceURI)
getCustomPrefixes in class AbstractNamespaceContext@Nullable protected String getCustomPrefix(@Nonnull String sNamespaceURI)
getCustomPrefix in class AbstractNamespaceContext@Nullable protected String getCustomNamespaceURI(@Nonnull String sPrefix)
getCustomNamespaceURI in class AbstractNamespaceContext@Nonnull @ReturnsMutableCopy public Map<String,String> getPrefixToNamespaceURIMap()
IIterableNamespaceContextpublic boolean hasAnyMapping()
@Nonnegative public int getMappingCount()
Copyright © 2006–2014 phloc systems. All rights reserved.