Package com.luciad.lucy.map
Interface ILcyLayerStyleCodec
- All Known Implementing Classes:
TLcyCompositeLayerStyleCodec
public interface ILcyLayerStyleCodec
This interface models a codec (encoder/decoder) for ILcyLayerStyle
objects. The
codec is responsible for storing ILcyLayerStyle
objects to some (persistent)
storage, and to restore the ILcyLayerStyle
objects later on from that (persistent)
storage.
This functionality is currently only supported for Lightspeed layers.
- Since:
- 2012.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecode
(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle) Returnstrue
when this codec is capable of adjusting the state ofaLayerStyle
to match the settings stored in some (persistent) storage.boolean
canEncode
(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle) Returnstrue
if the givenILcyLayerStyle
, retrieved fromaLayer
, can be encoded by this codec.void
decode
(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) Adjusts the settings ofaLayerStyleSFCT
to match those stored inaInputStream
.void
encode
(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) Encodes the givenILcyLayerStyle
to the givenOutputStream
.Returns the display name of this decoder
-
Method Details
-
getDisplayName
String getDisplayName()Returns the display name of this decoder- Returns:
- the display name of this decoder
-
canDecode
Returnstrue
when this codec is capable of adjusting the state ofaLayerStyle
to match the settings stored in some (persistent) storage.- Parameters:
aLayer
- The layer from whichaLayerStyle
is retrievedaLayerStyle
- The layer style which will be adjusted in thedecode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)
method with the stored settings- Returns:
true
when this decoder is capable of adjusting the state ofaLayerStyle
to match the settings stored in some (persistent) storage- See Also:
-
decode
void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException, UnsupportedOperationException Adjusts the settings of
aLayerStyleSFCT
to match those stored inaInputStream
.- Parameters:
aLayer
- The layer from whichaLayerStyleSFCT
is retrievedaLayerStyleSFCT
- The layer style of which the settings must be adjusted to match those stored inaInputStream
aInputStream
- The input stream from which the settings can be read- Throws:
IOException
- in case of IO failureUnsupportedOperationException
- whencanDecode
returnsfalse
for the same layer and layer style- See Also:
-
canEncode
Returnstrue
if the givenILcyLayerStyle
, retrieved fromaLayer
, can be encoded by this codec.- Parameters:
aLayer
- The layer from whichaLayerStyle
is retrievedaLayerStyle
- The style of theaLayer
- Returns:
true
ifaLayerStyle
can be encoded by this codec- See Also:
-
encode
void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException, UnsupportedOperationException Encodes the given
ILcyLayerStyle
to the givenOutputStream
.- Parameters:
aLayer
- The layer from whichaLayerStyle
is retrievedaLayerStyle
- The style of theaLayer
aOutputStream
- The output stream to which the style must be encoded.- Throws:
IOException
- in case of IO failureUnsupportedOperationException
- whencanEncode
returnsfalse
for the same layer and layer style- See Also:
-