public class TLcyCompositeLayerStyleCodec extends TLcyGenericComposite<TLcyLayerStyleCodecHolder> implements ILcyLayerStyleCodec
Composite implementation of ILcyLayerStyleCodec
.
Note: the ILcyLayerStyleCodec
s are not directly registered as service to
Lucy, but wrapped with a holder object
. This holder object
allows to register the ILcyLayerStyleCodec
with some extra information like e.g. an
ALcyFileTypeDescriptor
. Using a back-end based TLcyCompositeLayerStyleCodec
will only use the registered TLcyLayerStyleCodecHolder
objects, and not for example an
ILcyLayerStyleCodec
which was directly (=not wrapped) registered as a service.
TLcyGenericComposite
PRIORITY_DEFAULT, PRIORITY_FALLBACK
Constructor and Description |
---|
TLcyCompositeLayerStyleCodec()
Default constructor.
|
TLcyCompositeLayerStyleCodec(ILcyLucyEnv aLucyEnv)
Construct a
TLcyCompositeLayerStyleCodec working on the Lucy back-end. |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle)
Returns
true when this codec is capable of adjusting the state of
aLayerStyle to match the settings stored in some (persistent) storage. |
boolean |
canEncode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle)
Returns
true if the given ILcyLayerStyle , retrieved from
aLayer , can be encoded by this codec. |
void |
decode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyleSFCT,
InputStream aInputStream)
Adjusts the settings of
aLayerStyleSFCT to match those stored in
aInputStream . |
void |
encode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle,
OutputStream aOutputStream)
Encodes the given
ILcyLayerStyle to the given OutputStream . |
String |
getDisplayName()
Returns the display name of this decoder
|
add, add, getList, getPriority, iterator, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public TLcyCompositeLayerStyleCodec()
Default constructor. No ILcyLayerStyleCodec
s are associated.
The created instance will only work on the ILcyLayerStyleCodec
instances
registered to it. If you want to use all registered ILcyLayerStyleCodec
instances
of the Lucy back-end, use TLcyCompositeLayerStyleCodec(com.luciad.lucy.ILcyLucyEnv)
instead.
public TLcyCompositeLayerStyleCodec(ILcyLucyEnv aLucyEnv)
Construct a TLcyCompositeLayerStyleCodec
working on the Lucy back-end.
If you want to create a TLcyCompositeLayerStyleCodec
which does not use the
back-end, use TLcyCompositeLayerStyleCodec()
instead.
aLucyEnv
- The Lucy back-endTLcyGenericComposite.TLcyGenericComposite(com.luciad.lucy.ILcyLucyEnv, Class)
,
TLcyCompositeLayerStyleCodec()
public String getDisplayName()
ILcyLayerStyleCodec
getDisplayName
in interface ILcyLayerStyleCodec
public boolean canDecode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle)
ILcyLayerStyleCodec
true
when this codec is capable of adjusting the state of
aLayerStyle
to match the settings stored in some (persistent) storage.canDecode
in interface ILcyLayerStyleCodec
aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The layer style which will be adjusted in the ILcyLayerStyleCodec.decode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)
method with the stored settingstrue
when this decoder is capable of adjusting the state of
aLayerStyle
to match the settings stored in some (persistent) storageILcyLayerStyleCodec.decode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)
public void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException
ILcyLayerStyleCodec
Adjusts the settings of aLayerStyleSFCT
to match those stored in
aInputStream
.
decode
in interface ILcyLayerStyleCodec
aLayer
- The layer from which aLayerStyleSFCT
is retrievedaLayerStyleSFCT
- The layer style of which the settings must be adjusted to match those
stored in aInputStream
aInputStream
- The input stream from which the settings can be readIOException
- in case of IO failureILcyLayerStyleCodec.canDecode(com.luciad.view.ILcdLayer, ILcyLayerStyle)
public boolean canEncode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle)
ILcyLayerStyleCodec
true
if the given ILcyLayerStyle
, retrieved from
aLayer
, can be encoded by this codec.canEncode
in interface ILcyLayerStyleCodec
aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The style of the aLayer
true
if aLayerStyle
can be encoded by this codecILcyLayerStyleCodec.encode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.OutputStream)
public void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException
ILcyLayerStyleCodec
Encodes the given ILcyLayerStyle
to the given OutputStream
.
encode
in interface ILcyLayerStyleCodec
aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The style of the aLayer
aOutputStream
- The output stream to which the style must be encoded.IOException
- in case of IO failureILcyLayerStyleCodec.canEncode(com.luciad.view.ILcdLayer, ILcyLayerStyle)