Class SpecializedIdentifier<T>

java.lang.Object
org.apache.sis.internal.jaxb.SpecializedIdentifier<T>
Type Parameters:
T - the value type, typically XLink, UUID or String.
All Implemented Interfaces:
Serializable, Cloneable, org.opengis.metadata.Identifier, org.opengis.referencing.ReferenceIdentifier

public final class SpecializedIdentifier<T> extends Object implements org.opengis.referencing.ReferenceIdentifier, Cloneable, Serializable
Wraps a XLink, URI or UUID as an identifier in the IdentifierMap. The authority is typically an instance of NonMarshalledAuthority. The value is an object of a type constrained by the authority.
Since:
0.3
Version:
0.7
Author:
Martin Desruisseaux (Geomatys)
See Also:
  • Field Summary

    Fields inherited from interface org.opengis.metadata.Identifier

    AUTHORITY_KEY, CODE_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

    CODESPACE_KEY, VERSION_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new adapter for the given authority and identifier value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of this identifier.
    boolean
    equals(Object other)
    Compares this identifier with the given object for equality.
    org.opengis.metadata.citation.Citation
    Returns the authority specified at construction time.
    Returns a string representation of the identifier value, or null if none.
    Infers a code space from the authority.
    Returns the identifier value.
    Returns null since this class does not hold version information.
    int
    Returns a hash code value for this identifier.
    Returns a string representation of this identifier.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SpecializedIdentifier

      public SpecializedIdentifier(IdentifierSpace<T> authority, T value)
      Creates a new adapter for the given authority and identifier value.
      Parameters:
      authority - the identifier authority.
      value - the identifier value, or null if not yet defined.
  • Method Details

    • getAuthority

      public org.opengis.metadata.citation.Citation getAuthority()
      Returns the authority specified at construction time.
      Specified by:
      getAuthority in interface org.opengis.metadata.Identifier
      Returns:
      the identifier authority.
    • getValue

      public T getValue()
      Returns the identifier value. This is the code expressed as an object more specialized than String.
      Returns:
      the identifier value, or null if none.
    • getCode

      public String getCode()
      Returns a string representation of the identifier value, or null if none.
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Returns:
      the identifier value.
    • getCodeSpace

      public String getCodeSpace()
      Infers a code space from the authority.
      Specified by:
      getCodeSpace in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      the code space, or null if none.
      Since:
      0.5
    • getVersion

      public String getVersion()
      Returns null since this class does not hold version information.
      Specified by:
      getVersion in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      null.
      Since:
      0.5
    • hashCode

      public int hashCode()
      Returns a hash code value for this identifier.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Compares this identifier with the given object for equality.
      Overrides:
      equals in class Object
      Parameters:
      other - the object to compare with this identifier for equality.
    • clone

      public Object clone()
      Returns a clone of this identifier.
      Overrides:
      clone in class Object
      Returns:
      a shallow clone of this identifier.
    • toString

      public String toString()
      Returns a string representation of this identifier. Example: Identifier[gco:uuid=“42924124-032a-4dfe-b06e-113e3cb81cf0”].
      Overrides:
      toString in class Object
      See Also: