Class SimpleIdentifier

java.lang.Object
org.apache.sis.internal.simple.SimpleIdentifier
All Implemented Interfaces:
Serializable, Deprecable, org.opengis.metadata.Identifier, org.opengis.referencing.ReferenceIdentifier
Direct Known Subclasses:
PropertyInformation

public class SimpleIdentifier extends Object implements org.opengis.referencing.ReferenceIdentifier, Deprecable, Serializable
An implementation of ReferenceIdentifier as a wrapper around a Citation.
Since:
0.3
Version:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.opengis.metadata.citation.Citation
    Organization or party responsible for definition and maintenance of the code, or null if none.
    protected final String
    Alphanumeric value identifying an instance in the namespace.
    protected final boolean
    true if this identifier is deprecated.
    private static final long
    For cross-version compatibility.

    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
    SimpleIdentifier(org.opengis.metadata.citation.Citation authority, String code, boolean isDeprecated)
    Creates a new reference identifier.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Invoked by toString() in order to allow subclasses to add additional information.
    boolean
    Returns true if the given object is of the same class than this SimpleIdentifier and has the same values.
    org.opengis.metadata.citation.Citation
    Returns the organization or party responsible for definition and maintenance of the code, or null if none.
    Returns the alphanumeric value identifying an instance in the namespace.
    Returns the identifier or namespace in which the code is valid, or null if none.
    org.opengis.util.InternationalString
    Returns a natural language description of the meaning of the code value.
    org.opengis.util.InternationalString
    An optional free text.
    Version identifier for the namespace, as specified by the code authority.
    int
    Returns a hash code value for this identifier.
    boolean
    true if this identifier is deprecated.
    final String
    Returns a string representation of this identifier.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • authority

      protected final org.opengis.metadata.citation.Citation authority
      Organization or party responsible for definition and maintenance of the code, or null if none. It can be a bibliographical reference to an international standard such as ISO 19115.
      See Also:
    • code

      protected final String code
      Alphanumeric value identifying an instance in the namespace. It can be for example the name of a class defined by the international standard referenced by the authority citation.
      See Also:
    • isDeprecated

      protected final boolean isDeprecated
      true if this identifier is deprecated.
  • Constructor Details

    • SimpleIdentifier

      public SimpleIdentifier(org.opengis.metadata.citation.Citation authority, String code, boolean isDeprecated)
      Creates a new reference identifier.
      Parameters:
      authority - responsible party for definition and maintenance of the code, or null.
      code - alphanumeric value identifying an instance in the namespace.
      isDeprecated - true if this identifier is deprecated.
  • Method Details

    • getAuthority

      public org.opengis.metadata.citation.Citation getAuthority()
      Returns the organization or party responsible for definition and maintenance of the code, or null if none. It can be a bibliographical reference to an international standard such as ISO 19115.

      The default implementation returns the citation specified at construction time.

      Specified by:
      getAuthority in interface org.opengis.metadata.Identifier
      Returns:
      the authority given at construction time, or null if none.
    • getCodeSpace

      public String getCodeSpace()
      Returns the identifier or namespace in which the code is valid, or null if none. The default implementation returns the shortest identifier of the authority, if any.
      Specified by:
      getCodeSpace in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      a code space inferred from the authority given at construction time, or null if none.
    • getCode

      public String getCode()
      Returns the alphanumeric value identifying an instance in the namespace. It can be for example the name of a class defined by the international standard referenced by the authority citation.

      The default implementation returns the code specified at construction time.

      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Returns:
      the code given at construction time, or null if none.
    • getVersion

      public String getVersion()
      Version identifier for the namespace, as specified by the code authority. When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.
      Specified by:
      getVersion in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      a version inferred from the authority given at construction time, or null if none.
    • getDescription

      public org.opengis.util.InternationalString getDescription()
      Returns a natural language description of the meaning of the code value.
      Returns:
      natural language description, or null if none.
      Since:
      0.5
    • getRemarks

      public org.opengis.util.InternationalString getRemarks()
      An optional free text.
      Specified by:
      getRemarks in interface Deprecable
      Returns:
      comments about this instance, or null if none. Shall be the reason for deprecation or the alternative to use if this instance is deprecated.
      Since:
      0.6
    • isDeprecated

      public boolean isDeprecated()
      true if this identifier is deprecated.
      Specified by:
      isDeprecated in interface Deprecable
      Returns:
      true if this instance is deprecated.
      Since:
      0.6
    • equals

      public boolean equals(Object obj)
      Returns true if the given object is of the same class than this SimpleIdentifier and has the same values.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with this SimpleIdentifier for equality.
      Returns:
      true if both objects are equal.
    • hashCode

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

      public final String toString()
      Returns a string representation of this identifier.

      For customizing this string representation, see appendStringTo(StringBuilder).

      Overrides:
      toString in class Object
    • appendStringTo

      protected void appendStringTo(StringBuilder buffer)
      Invoked by toString() in order to allow subclasses to add additional information. This method is invoked just before the final ']' is appended to the buffer.
      Parameters:
      buffer - a buffer filled with the toString() characters, that subclasses can update.