org.geotoolkit.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:
3.19
Version:
3.19
Author:
Martin Desruisseaux (Geomatys)
See Also:
IdentifiedObject.getIdentifierMap()
Module:
utility/geotk-xml-base (download)    View source code for this class

Nested Class Summary
 
Nested classes/interfaces inherited from interface Map
Map.Entry<K,V>
 
Method Summary
<T> T
getSpecialized(IdentifierSpace<T> authority)
          Returns the identifier to which the specified key is mapped, or null if this map contains no mapping for the key.
<T> T
putSpecialized(IdentifierSpace<T> authority, T value)
          Associates the specified identifier with the specified key in this map (optional operation).
 
Methods inherited from interface Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getSpecialized

<T> T getSpecialized(IdentifierSpace<T> authority)
Returns the identifier to which the specified key is mapped, or null if this map contains no mapping for the key.

Type Parameters:
T - The identifier type.
Parameters:
authority - The key whose associated identifier is to be returned.
Returns:
The identifier to which the specified key is mapped, or null if this map contains no mapping for the key.

putSpecialized

<T> T putSpecialized(IdentifierSpace<T> authority,
                     T value)
                 throws UnsupportedOperationException
Associates the specified identifier with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value.

Type Parameters:
T - The identifier type.
Parameters:
authority - The key with which the specified identifier is to be associated.
value - The identifier to be associated with the specified key.
Returns:
The previous identifier associated with key, or null if there was no mapping for key.
Throws:
UnsupportedOperationException - If the identifier map is unmodifiable.


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.