Class SimpleNamespaceContext

java.lang.Object
net.shibboleth.utilities.java.support.xml.SimpleNamespaceContext
All Implemented Interfaces:
NamespaceContext

@Deprecated(since="8.3.0", forRemoval=true) @ThreadSafe public class SimpleNamespaceContext extends Object implements NamespaceContext
Deprecated, for removal: This API element is subject to removal in a future version.
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 Details

    • mappings

      private final ImmutableBiMap<String,String> mappings
      Deprecated, for removal: This API element is subject to removal in a future version.
      Mappings between namespace prefixes and namespace URIs.
  • Constructor Details

    • SimpleNamespaceContext

      public SimpleNamespaceContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
    • SimpleNamespaceContext

      public SimpleNamespaceContext(@Nullable @NullableElements Map<String,String> prefixToUriMappings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
      Parameters:
      prefixToUriMappings - Maps prefix values to the corresponding namespace URIs.
  • Method Details

    • getNamespaceURI

      @Nullable public String getNamespaceURI(String prefix)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getNamespaceURI in interface NamespaceContext
    • getPrefix

      @Nullable public String getPrefix(String namespaceURI)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getPrefix in interface NamespaceContext
    • getPrefixes

      @Nonnull public Iterator<String> getPrefixes(String namespaceURI)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getPrefixes in interface NamespaceContext
    • getMappingsBuilder

      @Nonnull private ImmutableBiMap.Builder<String,String> getMappingsBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build the initial set of mappings which contains entries for XML and XMLNS.
      Returns:
      initial set of mappings