Package com.helger.xml.namespace
Class SingleElementNamespaceContext
- java.lang.Object
-
- com.helger.xml.namespace.AbstractNamespaceContext
-
- com.helger.xml.namespace.SingleElementNamespaceContext
-
- All Implemented Interfaces:
IIterableNamespaceContext,INamespaceContext,Serializable,NamespaceContext
@Immutable public class SingleElementNamespaceContext extends AbstractNamespaceContext
Represents a namespace context having exactly 1 item.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SingleElementNamespaceContext(String sNamespaceURI)Create a namespace context with the default (empty) prefixSingleElementNamespaceContext(String sPrefix, String sNamespaceURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetCustomNamespaceURI(String sPrefix)protected StringgetCustomPrefix(String sNamespaceURI)protected Iterator<String>getCustomPrefixes(String sNamespaceURI)StringgetDefaultNamespaceURI()com.helger.commons.collection.impl.ICommonsMap<String,String>getPrefixToNamespaceURIMap()Get all contained mappings.StringtoString()-
Methods inherited from class com.helger.xml.namespace.AbstractNamespaceContext
getNamespaceURI, getPrefix, getPrefixes
-
-
-
-
Method Detail
-
getDefaultNamespaceURI
@Nullable public String getDefaultNamespaceURI()
- Specified by:
getDefaultNamespaceURIin classAbstractNamespaceContext
-
getCustomPrefixes
@Nullable protected Iterator<String> getCustomPrefixes(@Nullable String sNamespaceURI)
- Specified by:
getCustomPrefixesin classAbstractNamespaceContext
-
getCustomPrefix
@Nullable protected String getCustomPrefix(@Nullable String sNamespaceURI)
- Specified by:
getCustomPrefixin classAbstractNamespaceContext
-
getCustomNamespaceURI
@Nullable protected String getCustomNamespaceURI(@Nullable String sPrefix)
- Specified by:
getCustomNamespaceURIin classAbstractNamespaceContext
-
getPrefixToNamespaceURIMap
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsMap<String,String> getPrefixToNamespaceURIMap()
Description copied from interface:IIterableNamespaceContextGet all contained mappings.- Returns:
- The map with all prefixes mapped to the namespace URIs.
-
-