@NotThreadSafe public class MapBasedNamespaceContext extends AbstractNamespaceContext implements ICloneable<MapBasedNamespaceContext>
| Constructor and Description |
|---|
MapBasedNamespaceContext() |
MapBasedNamespaceContext(IIterableNamespaceContext aOther) |
MapBasedNamespaceContext(MapBasedNamespaceContext aOther) |
getNamespaceURI, getPrefix, getPrefixespublic MapBasedNamespaceContext()
public MapBasedNamespaceContext(@Nullable MapBasedNamespaceContext aOther)
public MapBasedNamespaceContext(@Nullable IIterableNamespaceContext aOther)
@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.IllegalArgumentException - If another mapping for the passed prefix is already presentsetMapping(String, String)@Nonnull public MapBasedNamespaceContext setMapping(@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.addMapping(String, String)@Nonnull public final MapBasedNamespaceContext addMappings(@Nullable IIterableNamespaceContext aOther)
@Nonnull public final MapBasedNamespaceContext setMappings(@Nullable IIterableNamespaceContext aOther)
@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()
IIterableNamespaceContextgetPrefixToNamespaceURIMap in interface IIterableNamespaceContextpublic boolean hasAnyMapping()
@Nonnegative public int getMappingCount()
@Nonnull @ReturnsMutableCopy public MapBasedNamespaceContext getClone()
getClone in interface ICloneable<MapBasedNamespaceContext>Copyright © 2014–2016 Philip Helger. All rights reserved.