Class DefaultMetadata

  • All Implemented Interfaces:
    Serializable, Emptiable, Lenient­Comparable, Identified­Object, Metadata

    public class DefaultMetadata
    extends ISOMetadata
    implements Metadata
    Root entity which defines metadata about a resource or resources. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
    MD_Metadata   ├─language………………………………………………… Language used for documenting metadata.   ├─character­Set……………………………………… Full name of the character coding standard used for the metadata set.   ├─contact…………………………………………………… Parties responsible for the metadata information.   │   ├─party……………………………………………… Information about the parties.   │   │   └─name……………………………………… Name of the party.   │   └─role………………………………………………… Function performed by the responsible party.   ├─identification­Info……………………… Basic information about the resource(s) to which the metadata applies.   │   ├─citation……………………………………… Citation data for the resource(s).   │   │   ├─title…………………………………… Name by which the cited resource is known.   │   │   └─date……………………………………… Reference date for the cited resource.   │   ├─abstract……………………………………… Brief narrative summary of the content of the resource(s).   │   ├─extent…………………………………………… Bounding polygon, vertical, and temporal extent of the dataset.   │   │   ├─description…………………… The spatial and temporal extent for the referring object.   │   │   ├─geographic­Element…… Geographic component of the extent of the referring object.   │   │   ├─temporal­Element………… Temporal component of the extent of the referring object.   │   │   └─vertical­Element………… Vertical component of the extent of the referring object.   │   └─topic­Category………………………… Main theme(s) of the dataset.   ├─date­Info………………………………………………… Date(s) associated with the metadata.   ├─metadata­Scope…………………………………… The scope or type of resource for which metadata is provided.   │   └─resource­Scope………………………… Resource scope   └─parent­Metadata………………………………… Identification of the parent metadata record.       ├─title……………………………………………… Name by which the cited resource is known.       └─date………………………………………………… Reference date for the cited resource.
    Localization
    When this object is marshalled as an ISO 19139 compliant XML document, the value given to the set­Language(Locale) method will be used for the localization of International­String and Code­List instances of in this Default­Metadata object and every children, as required by INSPIRE rules. If no language were specified, then the default locale will be the one defined in the XML​.LOCALE marshaller property, if any.
    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

    • Constructor Detail

      • DefaultMetadata

        public DefaultMetadata()
        Creates an initially empty metadata.
      • DefaultMetadata

        public DefaultMetadata​(ResponsibleParty contact,
                               Date dateStamp,
                               Identification identificationInfo)
        Creates a meta data initialized to the specified values.
        Parameters:
        contact - party responsible for the metadata information.
        date­Stamp - date that the metadata was created.
        identification­Info - basic information about the resource to which the metadata applies.
      • DefaultMetadata

        public DefaultMetadata​(Metadata object)
        Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, since the other metadata contained in the given object are not recursively copied.
        Parameters:
        object - the metadata to copy values from, or null if none.
        See Also:
        cast­Or­Copy(Metadata)
    • Method Detail

      • castOrCopy

        public static DefaultMetadata castOrCopy​(Metadata object)
        Returns a SIS metadata 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 Default­Metadata, then it is returned unchanged.
        • Otherwise a new Default­Metadata 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.
      • getMetadataIdentifier

        @UML(identifier="metadataIdentifier",
             obligation=OPTIONAL,
             specification=ISO_19115)
        public Identifier getMetadataIdentifier()
        Returns a unique identifier for this metadata record.
        Note: OGC 07-045 (Catalog Service Specification — ISO metadata application profile) recommends usage of a UUID (Universal Unique Identifier) as specified by IETF to ensure identifier’s uniqueness.
        Returns:
        unique identifier for this metadata record, or null.
        Since:
        0.5
      • setMetadataIdentifier

        public void setMetadataIdentifier​(Identifier newValue)
        Sets the unique identifier for this metadata record.
        Parameters:
        new­Value - the new identifier, or null if none.
        Since:
        0.5
      • setFileIdentifier

        @Deprecated
        public void setFileIdentifier​(String newValue)
        Deprecated.
        As of ISO 19115:2014, replaced by set­Metadata­Identifier(Identifier)
        Sets the unique identifier for this metadata file.
        Parameters:
        new­Value - the new identifier, or null if none.
      • getLocalesAndCharsets

        @UML(identifier="defaultLocale+otherLocale",
             obligation=CONDITIONAL,
             specification=ISO_19115)
        public Map<Locale,​Charset> getLocalesAndCharsets()
        Returns the language(s) and character set(s) used for documenting metadata. The first entry in iteration order is the default language and its character set. All other entries, if any, are alternate language(s) and character set(s) used within the resource.

        Unless another locale has been specified with the XML​.LOCALE property, this Default­Metadata instance and its children will use the first locale returned by this method for marshalling International­String and Code­List instances in ISO 19115-2 compliant XML documents.

        Each (Locale, Charset) entry is equivalent to an instance of ISO 19115 PT_Locale class. The language code and the character set are mandatory elements in ISO standard. Consequently this map should not contain null key or null values, but Apache SIS implementations is tolerant for historical reasons. The same character set may be associated to many languages.

        Returns:
        language(s) and character set(s) used for documenting metadata.
        Since:
        1.0
      • setLocalesAndCharsets

        public void setLocalesAndCharsets​(Map<? extends Locale,​? extends Charset> newValues)
        Sets the language(s) and character set(s) used within the dataset. The first element in iteration order should be the default language. All other elements, if any, are alternate language(s) used within the resource.
        Parameters:
        new­Values - the new language(s) and character set(s) used for documenting metadata.
        Since:
        1.0
        See Also:
        XML​.LOCALE
      • getLanguages

        @Deprecated
        public Collection<Locale> getLanguages()
        Deprecated.
        Replaced by get­Locales­And­Charsets().key­Set().
        Returns the language(s) used for documenting metadata. The first element in iteration order is the default language. All other elements, if any, are alternate language(s) used within the resource.
        Returns:
        language(s) used for documenting metadata.
        Since:
        0.5
      • setLanguages

        @Deprecated
        public void setLanguages​(Collection<Locale> newValues)
        Deprecated.
        Replaced by putting keys in get­Locales­And­Charsets() map.
        Sets the language(s) used for documenting metadata. The first element in iteration order shall be the default language. All other elements, if any, are alternate language(s) used within the resource.
        Parameters:
        new­Values - the new languages.
        Since:
        0.5
      • setLanguage

        @Deprecated
        public void setLanguage​(Locale newValue)
        Deprecated.
        Replaced by get­Locales­And­Charsets().put(new­Value, …).
        Sets the language used for documenting metadata. This method modifies the collection returned by get­Languages() as below:
        • If the languages collection is empty, then this method sets the collection to the given new­Value.
        • Otherwise the first element in the languages collection is replaced by the given new­Value.
        Parameters:
        new­Value - the new language.
      • setLocales

        @Deprecated
        public void setLocales​(Collection<? extends Locale> newValues)
        Deprecated.
        Replaced by putting keys in get­Locales­And­Charsets().
        Sets information about an alternatively used localized character string for a linguistic extension.
        Parameters:
        new­Values - the new locales.
      • setCharacterSets

        @Deprecated
        public void setCharacterSets​(Collection<? extends Charset> newValues)
        Deprecated.
        Replaced by putting values in get­Locales­And­Charsets() map.
        Sets the character coding standard used for the metadata set.
        Parameters:
        new­Values - the new character coding standards.
        Since:
        0.5
      • setCharacterSet

        @Deprecated
        public void setCharacterSet​(CharacterSet newValue)
        Deprecated.
        Replaced by get­Locales­And­Charsets().put(…, new­Value).
        Sets the character coding standard used for the metadata set.
        Parameters:
        new­Value - the new character set.
      • getParentMetadata

        @UML(identifier="parentMetadata",
             obligation=CONDITIONAL,
             specification=ISO_19115)
        public Citation getParentMetadata()
        Returns an identification of the parent metadata record. This is non-null if this metadata is a subset (child) of another metadata that is described elsewhere.
        Returns:
        identification of the parent metadata record, or null if none.
        Since:
        0.5
      • setParentMetadata

        public void setParentMetadata​(Citation newValue)
        Sets an identification of the parent metadata record.
        Parameters:
        new­Value - the new identification of the parent metadata record.
        Since:
        0.5
      • getParentIdentifier

        @Deprecated
        public String getParentIdentifier()
        Deprecated.
        As of ISO 19115:2014, replaced by get­Parent­Metadata().
        Returns the file identifier of the metadata to which this metadata is a subset (child).
        Specified by:
        get­Parent­Identifier in interface Metadata
        Returns:
        identifier of the metadata to which this metadata is a subset, or null.
      • setParentIdentifier

        @Deprecated
        public void setParentIdentifier​(String newValue)
        Deprecated.
        As of ISO 19115:2014, replaced by get­Parent­Metadata().
        Sets the file identifier of the metadata to which this metadata is a subset (child).
        Parameters:
        new­Value - the new parent identifier.
      • getMetadataScopes

        @UML(identifier="metadataScope",
             obligation=CONDITIONAL,
             specification=ISO_19115)
        public Collection<DefaultMetadataScope> getMetadataScopes()
        Returns the scope or type of resource for which metadata is provided.
        Upcoming API change — generalization
        The element type will be changed to the Metadata­Scope interface when GeoAPI will provide it (tentatively in GeoAPI 3.1).
        Returns:
        scope or type of resource for which metadata is provided.
        Since:
        0.5
      • setMetadataScopes

        public void setMetadataScopes​(Collection<? extends DefaultMetadataScope> newValues)
        Sets the scope or type of resource for which metadata is provided.
        Upcoming API change — generalization
        The element type will be changed to the Metadata­Scope interface when GeoAPI will provide it (tentatively in GeoAPI 3.1).
        Parameters:
        new­Values - the new scope or type of resource.
        Since:
        0.5
      • getContacts

        public Collection<ResponsibleParty> getContacts()
        Returns the parties responsible for the metadata information.
        Upcoming API change — generalization
        As of ISO 19115:2014, Responsible­Party is replaced by the Responsibility parent interface. This change will be tentatively applied in GeoAPI 4.0.
        Specified by:
        get­Contacts in interface Metadata
        Returns:
        parties responsible for the metadata information.
      • setContacts

        public void setContacts​(Collection<? extends ResponsibleParty> newValues)
        Sets the parties responsible for the metadata information.
        Parameters:
        new­Values - the new contacts.
      • setDateInfo

        public void setDateInfo​(Collection<? extends CitationDate> newValues)
        Sets the date(s) associated with the metadata. The collection should contains at least an element for Date­Type​.CREATION.
        Parameters:
        new­Values - new dates associated with the metadata.
        Since:
        0.5
      • setDateStamp

        @Deprecated
        public void setDateStamp​(Date newValue)
        Deprecated.
        As of ISO 19115:2014, replaced by set­Date­Info(Collection).
        Sets the date that the metadata was created.
        Parameters:
        new­Value - the new date stamp.
      • setMetadataStandards

        public void setMetadataStandards​(Collection<? extends Citation> newValues)
        Sets the citation(s) for the standard(s) to which the metadata conform. Metadata standard citations should include an identifier.
        Parameters:
        new­Values - the new standard(s) to which the metadata conform.
        Since:
        0.5
      • setMetadataProfiles

        public void setMetadataProfiles​(Collection<? extends Citation> newValues)
        Set the citation(s) for the profile(s) of the metadata standard to which the metadata conform. Metadata profile standard citations should include an identifier.
        Parameters:
        new­Values - the new profile(s) to which the metadata conform.
        Since:
        0.5
      • getAlternativeMetadataReferences

        @UML(identifier="alternativeMetadataReference",
             obligation=OPTIONAL,
             specification=ISO_19115)
        public Collection<Citation> getAlternativeMetadataReferences()
        Returns reference(s) to alternative metadata or metadata in a non-ISO standard for the same resource.
        Returns:
        reference(s) to alternative metadata (e.g. Dublin core, FGDC).
        Since:
        0.5
      • setAlternativeMetadataReferences

        public void setAlternativeMetadataReferences​(Collection<? extends Citation> newValues)
        Set reference(s) to alternative metadata or metadata in a non-ISO standard for the same resource.
        Parameters:
        new­Values - the new reference(s) to alternative metadata (e.g. Dublin core, FGDC).
        Since:
        0.5
      • setMetadataLinkages

        public void setMetadataLinkages​(Collection<? extends OnlineResource> newValues)
        Sets the online location(s) where the metadata is available.
        Parameters:
        new­Values - the new online location(s).
        Since:
        0.5
      • setSpatialRepresentationInfo

        public void setSpatialRepresentationInfo​(Collection<? extends SpatialRepresentation> newValues)
        Sets the digital representation of spatial information in the dataset.
        Parameters:
        new­Values - the new spatial representation info.
      • getReferenceSystemInfo

        public Collection<ReferenceSystem> getReferenceSystemInfo()
        Returns the description of the spatial and temporal reference systems used in the dataset.
        Specified by:
        get­Reference­System­Info in interface Metadata
        Returns:
        spatial and temporal reference systems used in the dataset.
      • setReferenceSystemInfo

        public void setReferenceSystemInfo​(Collection<? extends ReferenceSystem> newValues)
        Sets the description of the spatial and temporal reference systems used in the dataset.
        Parameters:
        new­Values - the new reference system info.
      • setMetadataExtensionInfo

        public void setMetadataExtensionInfo​(Collection<? extends MetadataExtensionInformation> newValues)
        Sets information describing metadata extensions.
        Parameters:
        new­Values - the new metadata extension info.
      • setIdentificationInfo

        public void setIdentificationInfo​(Collection<? extends Identification> newValues)
        Sets basic information about the resource(s) to which the metadata applies.
        Parameters:
        new­Values - the new identification info.
      • getContentInfo

        public Collection<ContentInformation> getContentInfo()
        Returns information about the feature catalogue and describes the coverage and image data characteristics.
        Specified by:
        get­Content­Info in interface Metadata
        Returns:
        the feature catalogue, coverage descriptions and image data characteristics.
      • setContentInfo

        public void setContentInfo​(Collection<? extends ContentInformation> newValues)
        Sets information about the feature catalogue and describes the coverage and image data characteristics.
        Parameters:
        new­Values - the new content info.
      • getDistributionInfo

        public Distribution getDistributionInfo()
        Returns information about the distributor of and options for obtaining the resource(s).
        Upcoming API change — multiplicity
        As of ISO 19115:2014, this singleton has been replaced by a collection. This change will tentatively be applied in GeoAPI 4.0.
        Specified by:
        get­Distribution­Info in interface Metadata
        Returns:
        the distributor of and options for obtaining the resource(s).
      • setDistributionInfo

        public void setDistributionInfo​(Distribution newValue)
        Sets information about the distributor of and options for obtaining the resource(s).
        Upcoming API change — multiplicity
        As of ISO 19115:2014, this singleton has been replaced by a collection. This change will tentatively be applied in GeoAPI 4.0.
        Parameters:
        new­Value - the new distribution info.
      • setDataQualityInfo

        public void setDataQualityInfo​(Collection<? extends DataQuality> newValues)
        Sets overall assessment of quality of a resource(s).
        Parameters:
        new­Values - the new data quality info.
      • setPortrayalCatalogueInfo

        public void setPortrayalCatalogueInfo​(Collection<? extends PortrayalCatalogueReference> newValues)
        Sets information about the catalogue of rules defined for the portrayal of a resource(s).
        Parameters:
        new­Values - the new portrayal catalog info.
      • setApplicationSchemaInfo

        public void setApplicationSchemaInfo​(Collection<? extends ApplicationSchemaInformation> newValues)
        Returns information about the conceptual schema of a dataset.
        Parameters:
        new­Values - the new application schema info.
      • setAcquisitionInformation

        public void setAcquisitionInformation​(Collection<? extends AcquisitionInformation> newValues)
        Sets information about the acquisition of the data.
        Parameters:
        new­Values - the new acquisition information.
      • getResourceLineages

        @UML(identifier="resourceLineage",
             obligation=OPTIONAL,
             specification=ISO_19115)
        public Collection<Lineage> getResourceLineages()
        Returns information about the provenance, sources and/or the production processes applied to the resource.
        Returns:
        information about the provenance, sources and/or the production processes.
        Since:
        0.5
      • setResourceLineages

        public void setResourceLineages​(Collection<? extends Lineage> newValues)
        Sets information about the provenance, sources and/or the production processes applied to the resource.
        Parameters:
        new­Values - new information about the provenance, sources and/or the production processes.
        Since:
        0.5