public class TLcdEarthRasterAssetCodec extends Object implements ILcdEarthAssetCodec
TLcdEarthRasterAsset
objects.TYPE_NAME
Constructor and Description |
---|
TLcdEarthRasterAssetCodec()
Creates a raster asset codec that uses the default model decoder factory.
|
TLcdEarthRasterAssetCodec(ILcdEarthNamedModelDecoderFactory aNamedModelDecoderFactory)
Creates a raster asset codec that uses the given model decoder factory to convert names to
model decoders and vice versa.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeAsset(Properties aProperties)
Returns true if this codec can create an ILcdEarthAsset based on the given
Properties object.
|
boolean |
canEncodeAsset(ILcdEarthAsset aAsset)
Returns true if this codec can create a Properties object for the
given ILcdEarthAsset.
|
protected TLcdEarthRasterAsset |
createAsset(Properties aProperties,
String aSource,
ILcdModelDecoder aModelDecoder,
ILcdBounds aBounds,
ILcdEarthTileSetCoverage.CoverageType aCoverageType,
double aPixelDensity,
Date aDate)
Creates an raster asset with the given parameters.
|
ILcdEarthAsset |
decodeAsset(Properties aProperties)
Calls
createAsset()
to create a new instance of ILcdEarthAsset . |
Properties |
encodeAsset(ILcdEarthAsset aAsset)
Create a Properties object based on an ILcdEarthAsset
|
String |
getDisplayName()
Returns a user-displayable name for this codec.
|
protected String |
getFormatNameForModelDecoder(ILcdModelDecoder aModelDecoder)
Returns the format name for the given model decoder.
|
protected ILcdModelDecoder |
getModelDecoderForFormatName(String aFormatName,
boolean forceChangeModelReferenceDecoder)
Returns a model decoder for the given format name.
|
ILcdEarthNamedModelDecoderFactory |
getNamedModelDecoderFactory()
Returns the model decoder factory used to convert names to model decoders and vice versa.
|
boolean |
isModelDecoderOptional()
Returns whether the model decoder is an optional field.
|
void |
setModelDecoderOptional(boolean aModelDecoderOptional)
sets whether the model decoder is an optional field.
|
void |
setNamedModelDecoderFactory(ILcdEarthNamedModelDecoderFactory aNamedModelDecoderFactory)
Sets the model decoder factory used to convert names to model decoders and vice versa.
|
public TLcdEarthRasterAssetCodec()
public TLcdEarthRasterAssetCodec(ILcdEarthNamedModelDecoderFactory aNamedModelDecoderFactory)
aNamedModelDecoderFactory
- A model decoder factory.public ILcdEarthNamedModelDecoderFactory getNamedModelDecoderFactory()
public void setNamedModelDecoderFactory(ILcdEarthNamedModelDecoderFactory aNamedModelDecoderFactory)
aNamedModelDecoderFactory
- the model decoder factory that should be usedpublic boolean isModelDecoderOptional()
true
.public void setModelDecoderOptional(boolean aModelDecoderOptional)
aModelDecoderOptional
- whether the model decoder should be an optional fieldisModelDecoderOptional()
public ILcdEarthAsset decodeAsset(Properties aProperties)
createAsset()
to create a new instance of ILcdEarthAsset
.decodeAsset
in interface ILcdEarthAssetCodec
aProperties
- the properties of the assetILcdEarthAsset
protected ILcdModelDecoder getModelDecoderForFormatName(String aFormatName, boolean forceChangeModelReferenceDecoder)
aFormatName
- The format name of the requested model decoder.forceChangeModelReferenceDecoder
- Whether the model reference decoder should always be
changed if possible. Even if the model decoder already
has one by default.protected TLcdEarthRasterAsset createAsset(Properties aProperties, String aSource, ILcdModelDecoder aModelDecoder, ILcdBounds aBounds, ILcdEarthTileSetCoverage.CoverageType aCoverageType, double aPixelDensity, Date aDate)
aProperties
parameter corresponds to that of
decodeAsset()
; the other parameters are values that have
already been decoded from these properties.aProperties
- The asset properties.aSource
- The asset source name.aModelDecoder
- The asset model decoder.aBounds
- The asset bounds.aCoverageType
- The asset coverage type.aPixelDensity
- The asset pixel density.aDate
- The asset modification date.public Properties encodeAsset(ILcdEarthAsset aAsset)
ILcdEarthAssetCodec
encodeAsset
in interface ILcdEarthAssetCodec
aAsset
- the asset to encode into a Properties objectprotected String getFormatNameForModelDecoder(ILcdModelDecoder aModelDecoder)
aModelDecoder
- The model decoder.public boolean canDecodeAsset(Properties aProperties)
ILcdEarthAssetCodec
canDecodeAsset
in interface ILcdEarthAssetCodec
aProperties
- a Properties object representing an ILcdEarthAssetpublic boolean canEncodeAsset(ILcdEarthAsset aAsset)
ILcdEarthAssetCodec
canEncodeAsset
in interface ILcdEarthAssetCodec
aAsset
- the ILcdEarthAsset to be encodedpublic String getDisplayName()
ILcdEarthAssetCodec
getDisplayName
in interface ILcdEarthAssetCodec