@LcdService(service=ILcdModelReferenceDecoder.class, priority=20000) public class TLcdWKTModelReferenceDecoder extends java.lang.Object implements ILcdModelReferenceDecoder, ILcdInputStreamFactoryCapable
ILcdModelReference
from a file in the directory of the given data source file aSource
.
aSource
is <name>.xxx
, it
first tries to open a file called <name>.prj
.
directory.prj
(this can be used as
a common default file for all the data files in the same directory).
.prj
and .PRJ
is tried for
case sensitive file systems.Constructor and Description |
---|
TLcdWKTModelReferenceDecoder() |
Modifier and Type | Method and Description |
---|---|
ILcdModelReference |
decodeModelReference(java.lang.String aSource)
Returns the model reference, associated with the specified data source.
|
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the input stream factory that is used.
|
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the input stream factory to be used.
|
public ILcdModelReference decodeModelReference(java.lang.String aSource) throws java.io.IOException
ILcdModelReferenceDecoder
decodeModelReference
in interface ILcdModelReferenceDecoder
aSource
- a data source for which to return the model reference; typically a file name or a URL.ILcdModelReference
associated with the data source. While null
is allowed, implementors are advised to throw an error instead.java.io.IOException
- if the ILcdModelReference
cannot be decoded. It is recommended
to throw a FileNotFoundException when the source passed does not point to an existing file. This allows
to differentiate between missing model reference files and corrupt model reference files.
InterruptedIOException
.
This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding
through the UI.public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
ILcdInputStreamFactoryCapable
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used.public ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactoryCapable
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable