Class ALfnAssetMetadata

java.lang.Object
com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata
com.luciad.fusion.tilestore.metadata.ALfnAssetMetadata
All Implemented Interfaces:
ILcdBounded
Direct Known Subclasses:
TLfnRasterAssetMetadata, TLfnVectorAssetMetadata

public abstract class ALfnAssetMetadata extends ALfnResourceMetadata implements ILcdBounded

A representation of an asset. It contains the following parameters in addition to those defined in the superclass:

  • asset parts: the parts that make up this asset. Each asset has at least one part. All of the metadata in the asset should apply to each of the parts.
  • type: the data type of an asset, one of ELfnDataType (required, must not be null)
  • clipping shape: the 2D clipping shape of an asset (optional, may be null). The clipping shape's coordinates are always in the asset's geographic reference. The clipping shape is typically more complex than the bounding box, it defines the area of the asset. The whole clipping shape must lie within the bounding box. Illustration of the difference between a bounding box and a clipping shape.
  • geographic reference: the geographic reference of the bounding box (required, must not be null)
  • root: the root of the location, for determining the relative path of the location when putting asset sources in Tile Store (optional, may be null)
  • location: the location for which the metadata decoder can decode metadata (but not necessarily a model). This is optional, it may be null. This location is distinct from the locations of the asset parts in that it does not necessarily point to a model itself, but rather to a common catalog file which also needs to be copied when putting asset sources in Tile Store. The typical example is a CATALOG.031 file for S-57 catalogue models. The location must include the root, if present.
  • support locations: any number of support files which do not belong to a particular asset part. This is optional, in which case it is empty but not null. They will be preserved when putting asset sources in Tile Store, but they cannot be decoded as model nor metadata themselves. The support locations must include the root, if present.

When you want to fuse data, you do not need to create instances of this class yourself. You can delegate the creation to the available ALfnFormat instances.


     ALfnEngineEnvironment engineEnvironment = ...;
     ALfnFormat format = engineEnvironment.getCompositeFormat();
     String path = ...;
     if ( format.canCreateAsset( path, null ) ){
       ALfnAssetMetadata metadata = format.createAsset( path, null );
     }
   

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

Since:
10.0
See Also:
  • Method Details

    • getAssetParts

      public List<? extends ALfnAssetMetadata.AssetPart> getAssetParts()
      Gets the parts of this asset as a Collection.

      OGC filter property XPath: lts:AssetPart

      Returns:
      the Collection of the parts of this asset, never null or empty
    • getType

      public ELfnDataType getType()
      Gets the type of this asset. The type reflects the intrinsic type of the source data, as opposed to getSupportedCoverageTypes(), which represents the type(s) of the coverages this asset can be fused in. The supported coverage types are optional and may be empty, in which case the type is assumed to be the only supported coverage type. Often, the supported coverage types contain the type, but this is not necessarily so. The most notable exception is vector data that can only be fused as image. Some examples:

      • Imagery can usually only be fused as image. The concrete metadata instance is TLfnRasterAssetMetadata with type IMAGE. Supported coverage types may be empty or may contain IMAGE.
      • Elevation data can usually be fused as elevation and image. The concrete metadata instance is TLfnRasterAssetMetadata with type ELEVATION. Supported coverage types may contain both ELEVATION and IMAGE.
      • Vector data that can be fused as vector. The concrete metadata instance is TLfnVectorAssetMetadata with type VECTOR. Supported coverage types may be empty or may contain VECTOR.
      • Vector data that can only be fused as image, such as ECDIS. The concrete metadata instance is TLfnRasterAssetMetadata with type VECTOR. Supported coverage types contains IMAGE.
      • Raster data that supports ALcdImage and which is image or elevation. The concrete metadata instance is TLfnRasterAssetMetadata with type IMAGE or ELEVATION. Supported coverage types contains RASTER, in addition to IMAGE and/or ELEVATION.
      • Raster data that supports ALcdImage and which is not image nor elevation, for example multispecral data. The concrete metadata instance is TLfnRasterAssetMetadata with type RASTER. Supported coverage types may be empty or may contain RASTER.

      OGC filter property XPath: lts:Type

      Returns:
      the asset type, never null
      See Also:
    • getFormat

      public String getFormat()

      Returns the name (see ALfnFormat#getName()) of the ALfnFormat which created this asset (for example, 'SHP').

      Returns:
      the name of the ALfnFormat which created this asset, possibly null
    • getSupportedCoverageTypes

      public List<ELfnDataType> getSupportedCoverageTypes()
      Gets the supported coverage types of this asset. When they are empty, the type is assumed to be the supported coverage type. Often, the supported coverage types contain the type, but this is not necessarily so. The most notable exception is vector data that can only be fused as image. Some examples:

      • Imagery can usually only be fused as image. The concrete metadata instance is TLfnRasterAssetMetadata with type IMAGE. Supported coverage types may be empty or may contain IMAGE.
      • Elevation data can usually be fused as elevation and image. The concrete metadata instance is TLfnRasterAssetMetadata with type ELEVATION. Supported coverage types may contain both ELEVATION and IMAGE.
      • Vector data that can be fused as vector. The concrete metadata instance is TLfnVectorAssetMetadata with type VECTOR. Supported coverage types may be empty or may contain VECTOR.
      • Vector data that can only be fused as image, such as ECDIS. The concrete metadata instance is TLfnRasterAssetMetadata with type VECTOR. Supported coverage types contains IMAGE.
      • Raster data that supports ALcdImage and which is image or elevation. The concrete metadata instance is TLfnRasterAssetMetadata with type IMAGE or ELEVATION. Supported coverage types contains RASTER, in addition to IMAGE and/or ELEVATION.
      • Raster data that supports ALcdImage and which is not image nor elevation, for example multispecral data. The concrete metadata instance is TLfnRasterAssetMetadata with type RASTER. Supported coverage types may be empty or may contain RASTER.

      The list returned by this method will be immutable. The instance returned by this method will be a different one than the one passed as parameter to ALfnAssetMetadata.Builder.supportedCoverageTypes(java.util.Collection).

      OGC filter property XPath: lts:SupportedCoverageType

      Returns:
      the supported coverage types, possibly empty but never null
      See Also:
    • getGeoReference

      public ILcdGeoReference getGeoReference()
      Gets the geographic reference of the bounding box of this asset.

      OGC filter property XPath: lts:GeoReference

      Returns:
      the geographic reference of the bounding box, never null
    • getClippingShape

      public ILcdShape getClippingShape()
      Gets the 2D clipping shape of this asset.

      OGC filter is not supported for this property, use bounding box instead.

      Returns:
      the 2D clipping shape, possibly null
      Since:
      2013.0
    • getBoundingShape

      public ILcdShape getBoundingShape()
      Deprecated.
      use getClippingShape() instead
    • getBoundingBox

      public ILcdBounds getBoundingBox()
      Gets the bounding box of this asset. If this asset has multiple parts, the bounding box will be the union of the bounding boxes of the parts.
      Returns:
      the bounding box of this asset, never null
    • getBounds

      public ILcdBounds getBounds()
      Gets the bounding box of this asset. This method behaves exactly the same as getBoundingBox(), it exists solely to implement the ILcdBounded interface.
      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the bounding box of this asset, never null
      See Also:
    • getMinScaleDenominator

      public int getMinScaleDenominator()
      Returns the denominator of the minimum scale at which this asset should be used. The scale of the asset is 1:denominator.

      The scale is expressed as the ratio between a distance on the displayed map and the corresponding distance in the real geographic environment. For instance, a scale of 1:1000 means that 1 centimeter on the map corresponds to 1000 centimeters in the real geographic context represented by the map.

      By default, the minimum scale denominator is -1, meaning "unlimited" (corresponds to a scale of 0).

      Use minimum scale denominators on assets to limit their visible range in the fused coverage. When applied correctly, this effectively limits the number of high-detailed assets that need to be loaded in order to fuse low-detailed tiles, thus avoiding memory problems.

      Returns:
      the minimum scale denominator, or -1 if undefined (unlimited)
    • getMaxScaleDenominator

      public int getMaxScaleDenominator()
      Returns the denominator of the maximum scale at which this asset should be used. The scale of the asset is 1:denominator.

      The scale is expressed as the ratio between a distance on the displayed map and the corresponding distance in the real geographic environment. For instance, a scale of 1:1000 means that 1 centimeter on the map corresponds to 1000 centimeters in the real geographic context represented by the map.

      By default, the maximum scale denominator is -1, meaning "unlimited" (corresponds to an infinite scale).

      Returns:
      the maximum scale denominator, or -1 if undefined (unlimited)
    • getRoot

      public URI getRoot()
      Gets the root of the locations common to all asset parts, possibly null. This root is used to relativize the locations.
      Returns:
      the root of the support files, possibly null
      Since:
      2014.0
      See Also:
    • getLocation

      public URI getLocation()
      Gets the catalog location, possibly null. There can be at most a single such location.

      The catalog location is the equivalent of a catalog source name that can be given to a model decoder to decode a (catalog) model. This is different from the locations of the individual asset parts. This is different from the support locations, because the latter can never be decoded into a model.

      The S-57 structure for example fits into this metadata model like so:

      • CATALOG.031: the asset metadata's location
      • ABCXCDV.000: the cell files, each of which is the location of an asset part
      Since:
      2014.0
    • getFeatureTypeStyles

      public List<TLcdSLDFeatureTypeStyle> getFeatureTypeStyles()
      Gets the feature type styles of this asset.

      OGC filter property XPath: lts:FeatureTypeStyle
      This property can be used with the OGC filter bounding box operator.

      Returns:
      the feature type styles, never null
    • asBuilder

      public abstract ALfnAssetMetadata.Builder<?,?> asBuilder()
      Description copied from class: ALfnResourceMetadata
      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.
      Specified by:
      asBuilder in class ALfnResourceMetadata
      Returns:
      a new builder
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class ALfnResourceMetadata