org.apache.sis.metadata.iso

## Class ISOMetadata

- Object
- - AbstractMetadata
  - - ModifiableMetadata
    - - ISOMetadata

- All Implemented Interfaces:
    Serializable, Cloneable, Emptiable, LenientComparable, IdentifiedObject
  Direct Known Subclasses:
    AbstractContentInformation, AbstractElement, AbstractGeographicExtent, AbstractGeolocationInformation, AbstractIdentification, AbstractParty, AbstractResult, AbstractSpatialRepresentation, DefaultAcquisitionInformation, DefaultAddress, DefaultAlgorithm, DefaultApplicationSchemaInformation, DefaultAssociatedResource, DefaultAttributeGroup, DefaultBrowseGraphic, DefaultCitation, DefaultCitationDate, DefaultConstraints, DefaultContact, DefaultCoupledResource, DefaultDataFile, DefaultDataQuality, DefaultDigitalTransferOptions, DefaultDimension, DefaultDistribution, DefaultDistributor, DefaultEnvironmentalRecord, DefaultEvent, DefaultExtendedElementInformation, DefaultExtent, DefaultFeatureTypeInfo, DefaultFeatureTypeList, DefaultFormat, DefaultGCP, DefaultGeometricObjects, DefaultIdentifier, DefaultInstrument, DefaultKeywordClass, DefaultKeywords, DefaultLineage, DefaultMaintenanceInformation, DefaultMedium, DefaultMetadata, DefaultMetadataExtensionInformation, DefaultMetadataScope, DefaultNominalResolution, DefaultObjective, DefaultOnlineResource, DefaultOperation, DefaultOperationChainMetadata, DefaultOperationMetadata, DefaultPlan, DefaultPlatform, DefaultPlatformPass, DefaultPortrayalCatalogueReference, DefaultProcessing, DefaultProcessStep, DefaultProcessStepReport, DefaultRangeDimension, DefaultRangeElementDescription, DefaultReleasability, DefaultRequestedDate, DefaultRequirement, DefaultResolution, DefaultResponsibility, DefaultScope, DefaultScopeDescription, DefaultSeries, DefaultSource, DefaultStandardOrderProcess, DefaultTelephone, DefaultTemporalExtent, DefaultUsage, DefaultVerticalExtent

      public class ISOMetadata
      extends ModifiableMetadata
      implements IdentifiedObject, Serializable

  The base class of ISO 19115 implementation classes. Each sub-classes implements one of the ISO Metadata interface provided by GeoAPI.

  Limitations:

  - Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
  - Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases. Serialization support is appropriate for short term storage or RMI between applications running the same version of Apache SIS. For long term storage, use `XML` instead.
  Since:
    0.3
  See Also:
    Serialized Form

  Defined in the `sis-metadata` module

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Collection<Identifier>` | `identifiers` All identifiers associated with this metadata, or `null` if none.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ISOMetadata()` Constructs an initially empty metadata.
    `protected` | `ISOMetadata(Object object)` Constructs a new metadata initialized with the values from the specified object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `freeze()` Declares this metadata and all its properties as unmodifiable.
    `IdentifierMap` | `getIdentifierMap()` A map view of the identifiers collection as (authority, code) entries.
    `Collection<Identifier>` | `getIdentifiers()` Returns all identifiers associated to this object.
    `MetadataStandard` | `getStandard()` Returns the metadata standard implemented by subclasses, which is ISO 19115.

    - ### Methods inherited from class ModifiableMetadata

      `checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, isModifiable, nonNullCollection, nonNullList, nonNullSet, singleton, unmodifiable, writeCollection, writeList, writeSet`

    - ### Methods inherited from class AbstractMetadata

      `asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString`

    - ### Methods inherited from class Object

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

- - ### Field Detail

    - #### identifiers

          protected Collection<Identifier> identifiers

      All identifiers associated with this metadata, or `null` if none. This field is initialized to a non-null value when first needed.

  - ### Constructor Detail

    - #### ISOMetadata

          protected ISOMetadata()

      Constructs an initially empty metadata.

    - #### ISOMetadata

          protected ISOMetadata(Object object)

      Constructs a new metadata initialized with the values from the specified object. If the given object is an instance of `IdentifiedObject`, then this constructor copies the collection of identifiers.
      Parameters:
        `object` - the metadata to copy values from, or `null` if none.

  - ### Method Detail

    - #### getStandard

          public MetadataStandard getStandard()

      Returns the metadata standard implemented by subclasses, which is ISO 19115.
      Note for implementors
      Subclasses shall not override this method in a way that depends on the object state, since this method may be indirectly invoked by copy constructors (i.e. is may be invoked before this metadata object is fully constructed).
      Specified by:
        `getStandard` in class `AbstractMetadata`
      Returns:
        the metadata standard, which is ISO 19115 by default.

    - #### getIdentifiers

          public Collection<Identifier> getIdentifiers()

      Returns all identifiers associated to this object. Each identifier code shall be unique in the identifier authority name space. Examples of namespace are:
      - EPSG codes
      - Universal Product Code (UPC)
      - National Stock Number (NSN)
      - International Standard Book Number (ISBN)
      - International Standard Serial Number (ISSN)
      - Universally Unique Identifier (UUID)
      - XML ID attribute
      - XLink (`href`, `role`, `arcrole`, `title`, `show` and `actuate` attributes)
      Note that XML ID attribute are actually unique only in the scope of the XML document being processed.
      Specified by:
        `getIdentifiers` in interface `IdentifiedObject`
      Returns:
        all identifiers associated to this object, or an empty collection if none.
      See Also:
        `DefaultCitation​.getIdentifiers()`, `DefaultObjective​.getIdentifiers()`, `AbstractIdentifiedObject​.getIdentifiers()`

    - #### getIdentifierMap

          public IdentifierMap getIdentifierMap()

      A map view of the identifiers collection as (authority, code) entries. Each map entry is associated to an element from the above identifier collection in which the key is the identifier authority and the value is the identifier code.

      There is usually a one-to-one relationship between the map entries and the identifier elements, but not always:

      - The map view may contain less entries, because the map interface allows only one entry per authority. If the identifier collection contains many identifiers for the same authority, then only the first occurrence is visible through this `Map` view.
      - The map view may also contain more entries than the identifier collection. For example the `Citation` interface defines separated attributes for ISBN, ISSN and other identifiers. This map view may choose to unify all those attributes in a single view.
      The map supports `put` operations if and only if this `IdentifiedObject` is modifiable.

      The default implementation returns a wrapper around the `identifiers` list. That map is live: changes in the identifiers list will be reflected in the map, and conversely.

      Specified by:
        `getIdentifierMap` in interface `IdentifiedObject`
      Returns:
        the identifiers as a map of (authority, code) entries, or an empty map if none.

    - #### freeze

          public void freeze()

      Declares this metadata and all its properties as unmodifiable. Any attempt to modify a property after this method call will throw an `UnmodifiableMetadataException`. If this metadata is already unmodifiable, then this method does nothing.

      Subclasses usually do not need to override this method since the default implementation performs most of its work using Java reflection.

      Overrides:
        `freeze` in class `ModifiableMetadata`
      See Also:
        `ModifiableMetadata​.isModifiable()`, `ModifiableMetadata​.checkWritePermission()`

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.