Class ALfnAssetMetadata.Builder<B extends ALfnAssetMetadata.Builder<B,P>,P extends ALfnAssetMetadata.AssetPart>

java.lang.Object
com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata.Builder<B>
com.luciad.fusion.tilestore.metadata.ALfnAssetMetadata.Builder<B,P>
Direct Known Subclasses:
TLfnRasterAssetMetadata.Builder, TLfnVectorAssetMetadata.Builder
Enclosing class:
ALfnAssetMetadata

public abstract static class ALfnAssetMetadata.Builder<B extends ALfnAssetMetadata.Builder<B,P>,P extends ALfnAssetMetadata.AssetPart> extends ALfnResourceMetadata.Builder<B>
Abstract builder for asset metadata.
Since:
11.0
  • Method Details

    • clearAssetParts

      public final B clearAssetParts()
      Clears all asset parts on the asset metadata being built.
      Returns:
      this builder
      Since:
      2014.0
    • addAssetPart

      public abstract ALfnAssetMetadata.AssetPart.Builder addAssetPart()
      Creates a new asset part builder, which adds an asset part to the asset metadata being built.
      Returns:
      a new asset part builder, never null
      Since:
      2014.0
    • assetParts

      public final B assetParts(Collection<P> aAssetParts)
      Sets the List of parts of the asset. The list must not be empty.

      Any existing parts are overwritten.

      Parameters:
      aAssetParts - the parts of the asset, must not be null or empty
      Returns:
      this builder
      Since:
      2013.0
    • setAssetParts

      public final B setAssetParts(Collection<P> aAssetParts)
      Deprecated.
    • assetParts

      public final B assetParts(P... aAssetParts)
      Sets the parts of the asset.

      Any existing parts are overwritten. Call this method without arguments to clear the asset parts.

      Parameters:
      aAssetParts - the parts of the asset, must not be null
      Returns:
      this builder
      Since:
      2013.0
    • setAssetParts

      public final B setAssetParts(P... aAssetParts)
    • addAssetPart

      public final B addAssetPart(P aAssetPart)
      Adds a part to this asset.
      Parameters:
      aAssetPart - the part to be added, must not be null
      Returns:
      this builder
    • addAssetParts

      public final B addAssetParts(Collection<P> aAssetParts)
      Adds multiple parts to this asset.
      Parameters:
      aAssetParts - the parts to be added, must nobe be null
      Returns:
      this builder
    • addAssetParts

      public final B addAssetParts(P... aAssetParts)
      Adds multiple parts to this asset.
      Parameters:
      aAssetParts - the parts to be added, must not be null
      Returns:
      this builder
    • type

      public B type(ELfnDataType aType)
      Sets the required type of the asset. If unset or if set to null, the default type will be used.

      For vector assets, the default type is VECTOR, which is the only allowed type.

      For raster assets, there is no default type and it must always be set explicitly.

      As a consequence of this method, the default supported coverage types will be adjusted.

      Parameters:
      aType - a type, or null to indicate the default type
      Returns:
      this builder
      Since:
      2013.0
    • format

      public final B format(String aFormat)
      Sets the required format of the asset.
      Parameters:
      aFormat - the format, must not be null
      Returns:
      this builder
      Since:
      2013.1
    • setType

      public final B setType(ELfnDataType aType)
      Deprecated.
      use type(ELfnDataType) instead
    • supportedCoverageTypes

      public final B supportedCoverageTypes(ELfnDataType... aSupportedCoverageTypes)
      Sets the supported coverage types. If not set or if set to null, the default will be used. The default supported coverage type is a singleton list containing the asset type itself. The supported coverage types should not be empty, even though it is allowed on the API.
      Parameters:
      aSupportedCoverageTypes - The supported coverage types. Use null to reset to default.
      Returns:
      this builder
      Since:
      2013.0
    • setSupportedCoverageTypes

      public final B setSupportedCoverageTypes(ELfnDataType... aSupportedCoverageTypes)
    • supportedCoverageTypes

      public final B supportedCoverageTypes(Collection<ELfnDataType> aSupportedCoverageTypes)
      Sets the supported coverage types. If not set or if set to null, the default will be used. The default supported coverage type is a singleton list containing the asset type itself. The supported coverage types should not be empty, even though it is allowed on the API.

      The collection of supported coverage types which you pass as parameter is internally copied to an immutable list. Any changes you make to the collection after having called this method will have no effect on the metadata. This also means that the list of supported coverage types you get using ALfnAssetMetadata.getSupportedCoverageTypes() will be different instance than the one you've passed as argument to this method.

      Parameters:
      aSupportedCoverageTypes - The supported coverage types. Use null to reset to default.
      Returns:
      this builder
      Since:
      2013.0
    • setSupportedCoverageTypes

      public final B setSupportedCoverageTypes(Collection<ELfnDataType> aSupportedCoverageTypes)
    • geoReference

      public final B geoReference(ILcdGeoReference aGeoReference)
      Sets the required geographic reference of the asset.

      This method may cause changes to the bounding boxes of the asset parts. They possibly need to be transformed to the new geographic reference.

      Parameters:
      aGeoReference - a geographic reference
      Returns:
      this builder
      Since:
      2013.0
    • setGeoReference

      public final B setGeoReference(ILcdGeoReference aGeoReference)
    • clippingShape

      public final B clippingShape(ILcdShape aClippingShape)
      Sets the optional clipping shape of the asset. It defaults to null if unspecified.
      Parameters:
      aClippingShape - a clipping shape, may be null
      Returns:
      this builder
      Since:
      2013.0
    • setBoundingShape

      public final B setBoundingShape(ILcdShape aBoundingShape)
    • minScaleDenominator

      public final B minScaleDenominator(int aScaleDenominator)
      Sets the denominator of the minimum scale at which this asset should be used. The scale of the asset is 1:denominator.
      Parameters:
      aScaleDenominator - the scale denominator of the minimum scale
      Returns:
      this builder
      Since:
      2013.0
      See Also:
    • setMinScaleDenominator

      public final B setMinScaleDenominator(int aScaleDenominator)
      Deprecated.
    • maxScaleDenominator

      public final B maxScaleDenominator(int aScaleDenominator)
      Sets the denominator of the maximum scale at which this asset should be used. The scale of the asset is 1:denominator.
      Parameters:
      aScaleDenominator - the scale denominator of the maximum scale
      Returns:
      this builder
      Since:
      2013.0
      See Also:
    • setMaxScaleDenominator

      public final B setMaxScaleDenominator(int aScaleDenominator)
      Deprecated.
    • root

      public final B root(URI aRoot)
      Sets the root for the location and support locations.
      Parameters:
      aRoot - the optional root of the asset part being built by this builder, may be null
      Returns:
      this builder
      Since:
      2014.0
    • location

      public final B location(URI aLocation)
      Sets the location. If there is a root, the location must include the root.
      Parameters:
      aLocation - the location to set
      Returns:
      this builder
      Since:
      2014.0
    • featureTypeStyles

      public B featureTypeStyles(TLcdSLDFeatureTypeStyle... aFeatureTypeStyles)
      Sets the feature type styles of the asset part being built by this builder. If not set or if set to null, the default SLD feature type styles will be used, which is the aggreggate of the SLD style files next to the asset part's source files if these exists.

      The style will be used when fusing assets to an image coverage. It will also be used by the WMS server for coverages with asset sources in Tile Store.

      Parameters:
      aFeatureTypeStyles - the SLD feature type styles to be used, or null to reset to default
      Returns:
      this builder
      Since:
      2016.0
    • featureTypeStyles

      public B featureTypeStyles(Collection<? extends TLcdSLDFeatureTypeStyle> aFeatureTypeStyles)
      Sets the feature type styles of the asset part being built by this builder. If not set or if set to null, the default SLD feature type styles will be used, which is the aggreggate of the SLD style files next to the asset part's source files if these exists.

      The style will be used when fusing assets to an image coverage. It will also be used by the WMS server for coverages with asset sources in Tile Store.

      Parameters:
      aFeatureTypeStyles - the SLD feature type styles to be used, or null to reset to default
      Returns:
      this builder
      Since:
      2016.0
    • getType

      public final ELfnDataType getType()
      Gets this builder's current type.
      Returns:
      the current type, possibly null
      Since:
      2012.0
    • getFormat

      public final String getFormat()
      Gets this builder's current format.
      Returns:
      the current format, possibly null
      Since:
      2012.0
    • getSupportedCoverageTypes

      public final List<ELfnDataType> getSupportedCoverageTypes()
      Gets this builder's current supported coverage types (unmodifiable).
      Returns:
      the current supported coverage types, possibly null
      Since:
      2012.0
    • getGeoReference

      public final ILcdGeoReference getGeoReference()
      Gets this builder's current geographic reference.
      Returns:
      the current georeference, possibly null
      Since:
      2012.0
    • getAssetPartBuilders

      public final List<ALfnAssetMetadata.AssetPart.Builder> getAssetPartBuilders()
      Gets this builder's current asset part builders as an unmodifiable list. You can use this method to inspect the properties of the asset parts being built.
      Returns:
      the current asset parts, possibly empty but never null
      Since:
      2014.0
    • getClippingShape

      public final ILcdShape getClippingShape()
      Gets this builder's current clipping shape.
      Returns:
      the current clipping shape, possibly null
      Since:
      2012.0
    • getMinScaleDenominator

      public final int getMinScaleDenominator()
      Gets this builder's current minimum scale denominator.
      Returns:
      the current minimum scale denominator
      Since:
      2012.0
    • getMaxScaleDenominator

      public final int getMaxScaleDenominator()
      Gets this builder's current maximum scale denominator.
      Returns:
      the current maximum scale denominator
      Since:
      2012.0
    • getRoot

      public final URI getRoot()
      Gets this builder's current root.
      Returns:
      the current root
      Since:
      2014.0
    • getLocation

      public final URI getLocation()
      Gets this builder's current location.
      Returns:
      the current location
      Since:
      2014.0
    • getFeatureTypeStyles

      public final List<TLcdSLDFeatureTypeStyle> getFeatureTypeStyles()
      Gets this builder's current list of feature type styles
      Returns:
      the current list of feature type styles
      Since:
      2016.0
    • build

      public abstract ALfnAssetMetadata build()
      Builds an immutable asset metadata from the current properties set on this builder. The asset metadata requires a geographic reference and a type. If none have been set, this method will throw a NullPointerException with an appropriate message.
      Specified by:
      build in class ALfnResourceMetadata.Builder<B extends ALfnAssetMetadata.Builder<B,P>>
      Returns:
      an immutable asset metadata, never null