public class TLcdOGCModelDecoderFactory extends Object implements ILcdOGCModelDecoderFactory
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)
.Constructor and Description |
---|
TLcdOGCModelDecoderFactory()
Constructs the model decoder factory.
|
TLcdOGCModelDecoderFactory(Predicate<String> aClassesPredicate)
Constructs the model decoder factory with a predicate allowing to filter on the model decoders.
|
Modifier and Type | Method and Description |
---|---|
ILcdModelDecoder |
createModelDecoder(ILcdDataSource aDataSource)
Creates a new
ILcdModelDecoder that can decode the specified data source. |
ILcdModelDecoder |
createModelDecoder(String aSource)
Creates a new
ILcdModelDecoder that can decode the specified
source. |
public TLcdOGCModelDecoderFactory()
public ILcdModelDecoder createModelDecoder(String aSource) throws IllegalArgumentException
ILcdOGCModelDecoderFactory
ILcdModelDecoder
that can decode the specified
source. Note that models produced by this decoder must implement
ILcd2DBoundsIndexedModel
, and the model descriptor must be an
ILcdFeaturedDescriptor
.createModelDecoder
in interface ILcdOGCModelDecoderFactory
aSource
- the source to obtain a ILcdModelDecoder
for.ILcdModelDecoder
that can decode the specified source.IllegalArgumentException
- if there is no ILcdModelDecoder
known for this source.public ILcdModelDecoder createModelDecoder(ILcdDataSource aDataSource) throws IllegalArgumentException
ILcdOGCModelDecoderFactory
Creates a new ILcdModelDecoder
that can decode the specified data source.
By default, this method checks if the given ILcdDataSource
is a
TLcdDataSource
. If so, it delegates to the ILcdOGCModelDecoderFactory.createModelDecoder(String)
method. If not, an IllegalArgumentException
is thrown.
createModelDecoder
in interface ILcdOGCModelDecoderFactory
aDataSource
- the data source to obtain a ILcdModelDecoder
for.ILcdModelDecoder
that can decode the specified source.IllegalArgumentException
- if there is no ILcdModelDecoder
known for this source.