Class ISOMetadata

    • 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 Identified­Object, 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 implementers
        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:
        get­Standard in class Abstract­Metadata
        Returns:
        the metadata standard, which is ISO 19115 by default.
      • 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 Identified­Object 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:
        get­Identifier­Map in interface Identified­Object
        Returns:
        the identifiers as a map of (authority, code) entries, or an empty map if none.
      • getIdentifier

        protected Identifier getIdentifier()
        Returns the first identifier which is presumed to be defined by ISO 19115 conceptual model. This method checks the authority for filtering ignorable identifiers like ISBN/ISSN codes and XML attributes. This convenience method is provided for implementation of public get­Identifier(Identifier) methods in subclasses having an identifier property with [0 … 1] multiplicity.
        Returns:
        an identifier from ISO 19115-3 conceptual model (excluding XML identifiers), or null if none.
        Since:
        1.0
      • setIdentifier

        protected void setIdentifier​(Identifier newValue)
        Sets the identifier for metadata objects that are expected to contain at most one ISO 19115 identifier. This convenience method is provided for implementation of public set­Identifier(Identifier) methods in subclasses having an identifier property with [0 … 1] multiplicity. The default implementation removes all identifiers that would be returned by get­Identifier() before to add the given one in the identifiers collection.
        Parameters:
        new­Value - the new identifier value, or null for removing the identifier.
        Since:
        1.0