NamespaceContextMap (A library with several utility classes to work with geo-spatial data: WmsUrlValidator, GeoGetStyles, etc.. 1.0.0-SNAPSHOT API)
Date: 2016-01-29

org.gcube.spatial.data.geoutility.util

## Class NamespaceContextMap

- java.lang.Object
- - org.gcube.spatial.data.geoutility.util.NamespaceContextMap

- All Implemented Interfaces:
    NamespaceContext

      public final class NamespaceContextMap
      extends Object
      implements NamespaceContext

  The Class NamespaceContextMap.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 22, 2016

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamespaceContextMap(Map<String,String> prefixMappings)` Constructor that takes a map of XML prefix-namespaceURI values.
    `NamespaceContextMap(String... mappingPairs)` Convenience constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getMap()` Gets the map.
    `String` | `getNamespaceURI(String prefix)`
    `String` | `getPrefix(String namespaceURI)`
    `Iterator<String>` | `getPrefixes(String namespaceURI)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NamespaceContextMap

          public NamespaceContextMap(Map<String,String> prefixMappings)

      Constructor that takes a map of XML prefix-namespaceURI values. A defensive copy is made of the map. An IllegalArgumentException will be thrown if the map attempts to remap the standard prefixes defined in the NamespaceContext contract.
      Parameters:
        `prefixMappings` - a map of prefix:namespaceURI values

    - #### NamespaceContextMap

          public NamespaceContextMap(String... mappingPairs)

      Convenience constructor.
      Parameters:
        `mappingPairs` - pairs of prefix-namespaceURI values

  - ### Method Detail

    - #### getNamespaceURI

          public String getNamespaceURI(String prefix)

      Specified by:
        `getNamespaceURI` in interface `NamespaceContext`

    - #### getPrefix

          public String getPrefix(String namespaceURI)

      Specified by:
        `getPrefix` in interface `NamespaceContext`

    - #### getPrefixes

          public Iterator<String> getPrefixes(String namespaceURI)

      Specified by:
        `getPrefixes` in interface `NamespaceContext`

    - #### getMap

          public Map<String,String> getMap()

      Gets the map.
      Returns:
        an unmodifiable map of the mappings in the form prefix-namespaceURI

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2016. All Rights Reserved.