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
ConstructorsConstructorDescriptionConstructs 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 newILcdModelDecoderthat can decode the specified data source.createModelDecoder(String aSource) Creates a newILcdModelDecoderthat 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:ILcdOGCModelDecoderFactoryCreates a newILcdModelDecoderthat can decode the specified source. Note that models produced by this decoder must implementILcd2DBoundsIndexedModel, and the model descriptor must be anILcdFeaturedDescriptor.- Specified by:
createModelDecoderin interfaceILcdOGCModelDecoderFactory- Parameters:
aSource- the source to obtain aILcdModelDecoderfor.- Returns:
- a new
ILcdModelDecoderthat can decode the specified source. - Throws:
IllegalArgumentException- if there is noILcdModelDecoderknown for this source.
-
createModelDecoder
public ILcdModelDecoder createModelDecoder(ILcdDataSource aDataSource) throws IllegalArgumentException Description copied from interface:ILcdOGCModelDecoderFactoryCreates a new
ILcdModelDecoderthat can decode the specified data source.By default, this method checks if the given
ILcdDataSourceis aTLcdDataSource. If so, it delegates to theILcdOGCModelDecoderFactory.createModelDecoder(String)method. If not, anIllegalArgumentExceptionis thrown.- Specified by:
createModelDecoderin interfaceILcdOGCModelDecoderFactory- Parameters:
aDataSource- the data source to obtain aILcdModelDecoderfor.- Returns:
- a new
ILcdModelDecoderthat can decode the specified source. - Throws:
IllegalArgumentException- if there is noILcdModelDecoderknown for this source.
-