Class TLcyCompositeLayerStyleCodec
- All Implemented Interfaces:
ILcyLayerStyleCodec
,Iterable<TLcyLayerStyleCodecHolder>
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.
- Since:
- 2012.0
- See Also:
-
Field Summary
Fields inherited from class com.luciad.lucy.util.TLcyGenericComposite
PRIORITY_DEFAULT, PRIORITY_FALLBACK
-
Constructor Summary
ConstructorDescriptionDefault constructor.TLcyCompositeLayerStyleCodec
(ILcyLucyEnv aLucyEnv) Construct aTLcyCompositeLayerStyleCodec
working on the Lucy back-end. -
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 decoderMethods inherited from class com.luciad.lucy.util.TLcyGenericComposite
add, add, getList, getPriority, iterator, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TLcyCompositeLayerStyleCodec
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 registeredILcyLayerStyleCodec
instances of the Lucy back-end, useTLcyCompositeLayerStyleCodec(com.luciad.lucy.ILcyLucyEnv)
instead.- See Also:
-
TLcyCompositeLayerStyleCodec
Construct a
TLcyCompositeLayerStyleCodec
working on the Lucy back-end.If you want to create a
TLcyCompositeLayerStyleCodec
which does not use the back-end, useTLcyCompositeLayerStyleCodec()
instead.- Parameters:
aLucyEnv
- The Lucy back-end- See Also:
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcyLayerStyleCodec
Returns the display name of this decoder- Specified by:
getDisplayName
in interfaceILcyLayerStyleCodec
- Returns:
- the display name of this decoder
-
canDecode
Description copied from interface:ILcyLayerStyleCodec
Returnstrue
when this codec is capable of adjusting the state ofaLayerStyle
to match the settings stored in some (persistent) storage.- Specified by:
canDecode
in interfaceILcyLayerStyleCodec
- Parameters:
aLayer
- The layer from whichaLayerStyle
is retrievedaLayerStyle
- The layer style which will be adjusted in theILcyLayerStyleCodec.decode(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
public void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException Description copied from interface:ILcyLayerStyleCodec
Adjusts the settings of
aLayerStyleSFCT
to match those stored inaInputStream
.- Specified by:
decode
in interfaceILcyLayerStyleCodec
- 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 failure- See Also:
-
canEncode
Description copied from interface:ILcyLayerStyleCodec
Returnstrue
if the givenILcyLayerStyle
, retrieved fromaLayer
, can be encoded by this codec.- Specified by:
canEncode
in interfaceILcyLayerStyleCodec
- Parameters:
aLayer
- The layer from whichaLayerStyle
is retrievedaLayerStyle
- The style of theaLayer
- Returns:
true
ifaLayerStyle
can be encoded by this codec- See Also:
-
encode
public void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException Description copied from interface:ILcyLayerStyleCodec
Encodes the given
ILcyLayerStyle
to the givenOutputStream
.- Specified by:
encode
in interfaceILcyLayerStyleCodec
- 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 failure- See Also:
-