Package org.apache.sis.metadata.iso

## Class ImmutableIdentifier

- Object
- - FormattableObject
  - - ImmutableIdentifier
    - - ImmutableIdentifier

- All Implemented Interfaces:
    `Serializable`, `Identifier`, `ReferenceIdentifier`

      @Deprecated
      public class ImmutableIdentifier
      extends ImmutableIdentifier

  Deprecated.
  Moved to `org​.apache​.sis​.referencing` for anticipation with Jigsaw modules.
  Immutable value uniquely identifying an object within a namespace, together with a version.
  Since:
    0.3
  See Also:
    Serialized Form

  Defined in the `sis-referencing` module

- - ### Field Summary

    - ### Fields inherited from class ImmutableIdentifier

      `DESCRIPTION_KEY`

    - ### Fields inherited from interface Identifier

      `AUTHORITY_KEY, CODE_KEY`

    - ### Fields inherited from interface ReferenceIdentifier

      `CODESPACE_KEY, VERSION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ImmutableIdentifier​(Map<String,​?> properties)` | Deprecated. Constructs an identifier from the given properties.
    `ImmutableIdentifier​(Citation authority, String codeSpace, String code)` | Deprecated. Creates a new identifier from the specified code and authority.
    `ImmutableIdentifier​(Citation authority, String codeSpace, String code, String version, InternationalString description)` | Deprecated. Creates a new identifier from the specified code and authority, with an optional version number and description.
    `ImmutableIdentifier​(ReferenceIdentifier identifier)` | Deprecated. Creates a new identifier from the specified one.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static ImmutableIdentifier` | `castOrCopy​(ReferenceIdentifier object)` | Deprecated. Returns a SIS identifier implementation with the values of the given arbitrary implementation.

    - ### Methods inherited from class ImmutableIdentifier

      `equals, formatTo, getAuthority, getCode, getCodeSpace, getDescription, getVersion, hashCode`

    - ### Methods inherited from class FormattableObject

      `print, toString, toString, toWKT`

    - ### Methods inherited from class Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ImmutableIdentifier

          public ImmutableIdentifier​(ReferenceIdentifier identifier)

      Deprecated.
      Creates a new identifier from the specified one. This is a copy constructor which get the code, codespace, authority and version from the given identifier.
      Parameters:
        `identifier` - the identifier to copy.
      See Also:
        `castOrCopy(ReferenceIdentifier)`

    - #### ImmutableIdentifier

          public ImmutableIdentifier​(Citation authority,
                                     String codeSpace,
                                     String code)

      Deprecated.
      Creates a new identifier from the specified code and authority.
      Parameters:
        `authority` - the person or party responsible for maintenance of the namespace, or `null` if not available.
        `codeSpace` - identifier or namespace in which the code is valid, or `null` if not available. This is often an abbreviation of the authority name.
        `code` - alphanumeric value identifying an instance in the namespace. The code can not be null.

    - #### ImmutableIdentifier

          public ImmutableIdentifier​(Citation authority,
                                     String codeSpace,
                                     String code,
                                     String version,
                                     InternationalString description)

      Deprecated.
      Creates a new identifier from the specified code and authority, with an optional version number and description.
      Parameters:
        `authority` - the person or party responsible for maintenance of the namespace, or `null` if not available.
        `codeSpace` - identifier or namespace in which the code is valid, or `null` if not available. This is often an abbreviation of the authority name.
        `code` - alphanumeric value identifying an instance in the namespace. The code can not be null.
        `version` - the version identifier for the namespace as specified by the code authority, or `null` if none.
        `description` - natural language description of the meaning of the code value, or `null` if none.

    - #### ImmutableIdentifier

          public ImmutableIdentifier​(Map<String,​?> properties)
                              throws IllegalArgumentException

      Deprecated.
      Constructs an identifier from the given properties. Keys are strings from the table below. The map given in argument shall contain an entry at least for the "code" key. Other properties listed in the table below are optional.

      Recognized properties
      Property name | Value type | Returned by
      --- | --- | ---
      "code" | `String` | `ImmutableIdentifier.getCode()`
      "codespace" | `String` | `ImmutableIdentifier.getCodeSpace()`
      "authority" | `String` or `Citation` | `ImmutableIdentifier.getAuthority()`
      "version" | `String` | `ImmutableIdentifier.getVersion()`
      "description" | `String` or `InternationalString` | `ImmutableIdentifier.getDescription()`
      "locale" | `Locale` | (none)

      Localization
      `"description"` is a localizable attributes which may have a language and country code suffix. For example the `"description_fr"` property stands for description in French and the `"description_fr_CA"` property stands for description in French Canadian.

      The `"locale"` property applies only to exception messages, if any. After successful construction, `ImmutableIdentifier` instances do not keep the locale since localizations are deferred to the `InternationalString​.toString(Locale)` method.

      Parameters:
        `properties` - the properties to be given to this identifier.
      Throws:
        `IllegalArgumentException` - if a property has an illegal value.

  - ### Method Detail

    - #### castOrCopy

          public static ImmutableIdentifier castOrCopy​(ReferenceIdentifier object)

      Deprecated.
      Returns a SIS identifier implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:
      - If the given object is `null`, then this method returns `null`.
      - Otherwise if the given object is already an instance of `ImmutableIdentifier`, then it is returned unchanged.
      - Otherwise a new `ImmutableIdentifier` instance is created using the copy constructor and returned. Note that this is a shallow copy operation, since the other metadata contained in the given object are not recursively copied.
      Parameters:
        `object` - the object to get as a SIS implementation, or `null` if none.
      Returns:
        a SIS implementation containing the values of the given object (may be the given object itself), or `null` if the argument was null.