Class ALfnResourceMetadata
- Direct Known Subclasses:
ALfnAssetMetadata,ALfnCoverageMetadata,TLfnThemeMetadata
- 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
nullif unspecified - abstract: an abstract (short description) of an asset (optional, defaults to
nullif unspecified) - update sequence: a version for a resource's metadata, defaults to
NEW_UPDATE_SEQUENCEif 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
nullif 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:
lts: the Luciad Tile Store namespacexlink: the XML Linking Language namespacegmd: the ISO 19115 Geographic Metadata namespacegco: the ISO 19115 Geographic Common namespace
- Since:
- 10.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstract builder for resource metadata. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML namespace for ISO19115 Geographic Common elements.static final StringXML namespace for ISO19115 Geographic Metadata elements.static final StringXML namespace for Luciad Tile Store elements.static final longUpdate sequence for a new or unknown resource.static final StringXML namespace for xlink elements. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaccept(ALfnResourceMetadataVisitor aVisitor) Accepts the visitor for visiting this resource.abstract ALfnResourceMetadata.Builder<?> Creates a new builder from this resource metadata.booleanGets the abstract of this asset.final longReturns a number representing when the data was last modified.final StringgetId()Gets the ID of this resource, which is nevernull.Gets the ISO 19115 metadata of this resource, ornullif none.final StringgetName()Gets the name of this resource, ornullif none.final longGets the update sequence (version) of this resource, which is never negative.inthashCode()final StringtoString()Gets the ID of this resource as a string representation.
-
Field Details
-
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:
-
XLINK_XML_NAMESPACE
XML namespace for xlink elements.- See Also:
-
ISO19115_GMD_XML_NAMESPACE
XML namespace for ISO19115 Geographic Metadata elements.- See Also:
-
ISO19115_GCO_XML_NAMESPACE
XML namespace for ISO19115 Geographic Common elements.- See Also:
-
NEW_UPDATE_SEQUENCE
public static final long NEW_UPDATE_SEQUENCEUpdate sequence for a new or unknown resource.- See Also:
-
-
Method Details
-
getId
Gets the ID of this resource, which is nevernull. 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
Gets the name of this resource, ornullif none.OGC filter property XPath:
lts:Name- Returns:
- the name of this resource, or
nullif none
-
getAbstract
Gets the abstract of this asset.OGC filter property XPath:
lts:Abstract- Returns:
- the abstract, or
nullif unspecified
-
getUpdateSequence
public final long getUpdateSequence()Gets the update sequence (version) of this resource, which is never negative. The default update sequence is0.OGC filter property XPath:
@updateSequence- Returns:
- the update sequence (version) of this resource
-
getISO19115Metadata
Gets the ISO 19115 metadata of this resource, ornullif 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
nullif none
- The language of the metadata:
-
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
- Whether the resource is present on both tile stores or not, based on the
-
equals
-
hashCode
public int hashCode() -
toString
Gets the ID of this resource as a string representation. -
accept
Accepts the visitor for visiting this resource. This provides a double-dispatch.- Parameters:
aVisitor- the visitor- See Also:
-
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
-