Package com.luciad.ogc.common
Class TLcdOGCModelDecoderFactory
java.lang.Object
com.luciad.ogc.common.TLcdOGCModelDecoderFactory
- All Implemented Interfaces:
ILcdOGCModelDecoderFactory
- Direct Known Subclasses:
TLcdModelDecoderFactory
Default implementation of
ILcdOGCModelDecoderFactory
that retrieves ILcdModelDecoder
instances using TLcdServiceLoader
. It makes sure that new instances are returned
for every call to ILcdOGCModelDecoderFactory.createModelDecoder(String)
or
ILcdOGCModelDecoderFactory.createModelDecoder(ILcdDataSource)
.- Since:
- 2017.0
-
Constructor Summary
ConstructorDescriptionConstructs the model decoder factory.TLcdOGCModelDecoderFactory
(Predicate<String> aClassesPredicate) Constructs the model decoder factory with a predicate allowing to filter on the model decoders. -
Method Summary
Modifier and TypeMethodDescriptioncreateModelDecoder
(ILcdDataSource aDataSource) Creates a newILcdModelDecoder
that can decode the specified data source.createModelDecoder
(String aSource) Creates a newILcdModelDecoder
that can decode the specified source.
-
Constructor Details
-
TLcdOGCModelDecoderFactory
public TLcdOGCModelDecoderFactory()Constructs the model decoder factory. -
TLcdOGCModelDecoderFactory
Constructs the model decoder factory with a predicate allowing to filter on the model decoders.- Parameters:
aClassesPredicate
- the predicate to filter on the model decoders, based on the class name.
-
-
Method Details
-
createModelDecoder
Description copied from interface:ILcdOGCModelDecoderFactory
Creates a newILcdModelDecoder
that can decode the specified source. Note that models produced by this decoder must implementILcd2DBoundsIndexedModel
, and the model descriptor must be anILcdFeaturedDescriptor
.- Specified by:
createModelDecoder
in interfaceILcdOGCModelDecoderFactory
- Parameters:
aSource
- the source to obtain aILcdModelDecoder
for.- Returns:
- a new
ILcdModelDecoder
that can decode the specified source. - Throws:
IllegalArgumentException
- if there is noILcdModelDecoder
known for this source.
-
createModelDecoder
public ILcdModelDecoder createModelDecoder(ILcdDataSource aDataSource) throws IllegalArgumentException Description copied from interface:ILcdOGCModelDecoderFactory
Creates a new
ILcdModelDecoder
that can decode the specified data source.By default, this method checks if the given
ILcdDataSource
is aTLcdDataSource
. If so, it delegates to theILcdOGCModelDecoderFactory.createModelDecoder(String)
method. If not, anIllegalArgumentException
is thrown.- Specified by:
createModelDecoder
in interfaceILcdOGCModelDecoderFactory
- Parameters:
aDataSource
- the data source to obtain aILcdModelDecoder
for.- Returns:
- a new
ILcdModelDecoder
that can decode the specified source. - Throws:
IllegalArgumentException
- if there is noILcdModelDecoder
known for this source.
-