Class ALfnResourceMetadata

java.lang.Object
com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata
Direct Known Subclasses:
ALfnAssetMetadata, ALfnCoverageMetadata, TLfnThemeMetadata

public abstract class ALfnResourceMetadata extends Object
An abstract representation of a resource. The resource metadata contains the following parameters:
  • ID: a unique identifier for a resource, it must be specified and must not be null
  • name: a (human-readable) name for a resource, defaults to null if unspecified
  • abstract: an abstract (short description) of an asset (optional, defaults to null if unspecified)
  • update sequence: a version for a resource's metadata, defaults to NEW_UPDATE_SEQUENCE if unspecified. The update sequence increases whenever a resource's metadata is modified; it is used to check for concurrent modifications. A higher update sequence indicates a more recent version
  • ISO 19115 metadata: ISO 19115 metadata for a resource, defaults to null if unspecified

Instances of this class are immutable and thus thread-safe.

This class and its subclasses implement a Builder design pattern: the resource metadata is immutable and cannot be instantiated directly. Instantiation and modification should go via a corresponding builder. Also a builder cannot be instantiated directly, it must be created via a static factory method on the concrete subclasses.

This class and its subclasses implement a Visitor design pattern, see ALfnResourceMetadataVisitor.

The properties of resource metadata can be queried using OGC Filters, via ALfnTileStore.query(com.luciad.fusion.tilestore.ILfnQueryHandler, com.luciad.fusion.tilestore.TLfnQuery). The OGC Filter XPath expression corresponding to a property is documented with each getter.
The XML namespace prefixes used in the documentation are as follows:

Please refer to the XPath 1.0 specification for more information on XPath expressions.

Since:
10.0
See Also:
  • Field Details

    • LTS_XML_NAMESPACE

      public static final String LTS_XML_NAMESPACE
      XML namespace for Luciad Tile Store elements. This constant points to the current LTS version, and may change in future releases when a newer protocol version becomes available.
      See Also:
    • ISO19115_GMD_XML_NAMESPACE

      public static final String ISO19115_GMD_XML_NAMESPACE
      XML namespace for ISO19115 Geographic Metadata elements.
      See Also:
    • ISO19115_GCO_XML_NAMESPACE

      public static final String ISO19115_GCO_XML_NAMESPACE
      XML namespace for ISO19115 Geographic Common elements.
      See Also:
    • NEW_UPDATE_SEQUENCE

      public static final long NEW_UPDATE_SEQUENCE
      Update sequence for a new or unknown resource.
      See Also:
  • Method Details

    • getId

      public final String getId()
      Gets the ID of this resource, which is never null. The default ID is a UUID.

      OGC filter property XPath: @id
      ID query is also supported directly using the OGC Filter object ID query.

      Returns:
      the ID of this resource
    • getName

      public final String getName()
      Gets the name of this resource, or null if none.

      OGC filter property XPath: lts:Name

      Returns:
      the name of this resource, or null if none
    • getAbstract

      public String getAbstract()
      Gets the abstract of this asset.

      OGC filter property XPath: lts:Abstract

      Returns:
      the abstract, or null if unspecified
    • getUpdateSequence

      public final long getUpdateSequence()
      Gets the update sequence (version) of this resource, which is never negative. The default update sequence is 0.

      OGC filter property XPath: @updateSequence

      Returns:
      the update sequence (version) of this resource
    • getISO19115Metadata

      public TLcdISO19115Metadata getISO19115Metadata()
      Gets the ISO 19115 metadata of this resource, or null if none.

      OGC filter property XPath: gmd:MD_Metadata
      Please refer to the ISO 19139:2007 specification for the XML schemas of ISO 19115 metadata.
      Sample XPaths:

      • The language of the metadata: /gmd:MD_Metadata/gmd:language/gco:CharacterString
      • The individual's name of a responsible party: //gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString
      • The security classification of a metadata: //gmd:MD_ClassificationCode

      Returns:
      the ISO 19115 metadata, or null if none
    • getGlobalUpdateSequence

      public final long getGlobalUpdateSequence()

      Returns a number representing when the data was last modified.

      A resource has a unique identifier across all tile stores (the getId()) indicating/identifying the resource. When a resource is updated (e.g. more recent data became available), the identifier remains unchanged. In order to indicate that the updated resource is a "newer" version of the same data, the last modified number of the updated resource will be larger then the modified number of the original resource.

      This mechanism allows to compare two tile stores and identify for each resource:

      • Whether the resource is present on both tile stores or not, based on the getId().
      • When the resource is present on both tile stores, which of the two is the most recent one.

      This number is automatically managed by LuciadFusion. While there is a method available on the Builder, you are not supposed to call this method yourself.

      Note that this is not the same as the update sequence. The update sequence is a tile store specific version number and cannot be used to compare resource versions across different tile stores.

      Returns:
      a number indicating when the resource was last modified.
      Since:
      2015.0
    • equals

      public boolean equals(Object aObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public final String toString()
      Gets the ID of this resource as a string representation.
      Overrides:
      toString in class Object
      Returns:
      the ID of this resource as a string representation
    • accept

      public abstract void accept(ALfnResourceMetadataVisitor aVisitor)
      Accepts the visitor for visiting this resource. This provides a double-dispatch.
      Parameters:
      aVisitor - the visitor
      See Also:
    • asBuilder

      public abstract ALfnResourceMetadata.Builder<?> asBuilder()
      Creates a new builder from this resource metadata. The builder's fields are initialized to the values of this resource metadata. The builder will build a resource metadata of the same type as this instance.
      Returns:
      a new builder
      Since:
      11.0