Package org.apache.sis.xml

## Interface IdentifierMap

- All Superinterfaces:
    `Map<Citation,​String>`

      public interface IdentifierMap
      extends Map<Citation,​String>

  A map view of some or all identifiers in an identified object. Each map entry is associated to an `Identifier` where key is the identifier authority and the value is the identifier code.

  Some XML identifiers are difficult to handle as `Identifier` objects. Those identifiers are rather handled using specialized classes like `XLink`. This `IdentifierMap` interface mirrors the standard `get` and `put` methods with specialized methods, in order to fetch and store identifiers as objects of the specialized class.

  Since:
    0.3
  See Also:
    `IdentifiedObject​.getIdentifierMap()`

  Defined in the `sis-metadata` module

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface Map

      `Map​.Entry<K extends Object,​V extends Object>`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T> T` | `getSpecialized​(IdentifierSpace<T> authority)` | Returns the identifier associated to the given namespace, or `null` if this map contains no mapping of the specialized type for the namespace.
    `<T> T` | `putSpecialized​(IdentifierSpace<T> authority, T value)` | Associates the given identifier with the given namespace in this map (optional operation).

    - ### Methods inherited from interface Map

      `clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

- - ### Method Detail

    - #### getSpecialized

          <T> T getSpecialized​(IdentifierSpace<T> authority)

      Returns the identifier associated to the given namespace, or `null` if this map contains no mapping of the specialized type for the namespace.
      Type Parameters:
        `T` - the identifier type.
      Parameters:
        `authority` - the namespace whose associated identifier is to be returned.
      Returns:
        the identifier to which the given namespace is mapped, or `null` if this map contains no mapping for the namespace.

    - #### putSpecialized

          <T> T putSpecialized​(IdentifierSpace<T> authority,
                               T value)
                        throws UnsupportedOperationException

      Associates the given identifier with the given namespace in this map (optional operation). If the map previously contained a mapping for the namespace, then the old value is replaced by the specified value.
      Type Parameters:
        `T` - the identifier type.
      Parameters:
        `authority` - the namespace with which the given identifier is to be associated.
        `value` - the identifier to be associated with the given namespace.
      Returns:
        the previous identifier associated with `authority`, or `null` if there was no mapping of the specialized type for `authority`.
      Throws:
        `UnsupportedOperationException` - if the identifier map is unmodifiable.