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 Identifier­Map 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:
  • Method Details

    • 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:
      Unsupported­Operation­Exception - if the identifier map is unmodifiable.