public abstract class ALcyDataSourceHandler extends Object
ILcdModelDecoder
is that a ALcyDataSourceHandler
is more general: it is not restricted to producing an ILcdModel
. The downside of
being more general is that typically more work needs to be done in the implementation of a
ALcyDataSourceHandler
.
Consult the "Loading data in Lucy" chapter in the Lucy developer guide for more information about how this class can be used for data loading, and for some examples.
Modifier | Constructor and Description |
---|---|
protected |
ALcyDataSourceHandler()
Creates a new
ALcyDataSourceHandler . |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canHandleDataSource(String aSourceName,
Object aTarget)
Checks whether the given data source can be handled by this handler.
|
abstract String |
getDisplayName()
Returns the display name of this data source handler.
|
abstract void |
handleDataSource(String aSourceName,
Object aTarget)
Handles the given aSourceName.
|
protected ALcyDataSourceHandler()
ALcyDataSourceHandler
.public abstract String getDisplayName()
public abstract boolean canHandleDataSource(String aSourceName, Object aTarget)
ALcyDataSourceHandler
can use to handle the file. For
example, in the File | Open action the object represents the ILcyMapComponent
in which aSourceName can be opened.aSourceName
- The data source to test for validity.aTarget
- An optional target param.public abstract void handleDataSource(String aSourceName, Object aTarget) throws IOException
ALcyDataSourceHandler
can use to handle the data source. For example, in the
FileOpen action the object represents the ILcyMapComponent
in
which aSourceName can be opened.aSourceName
- The source name to handle. It is up to subclasses to interpret this string
as a file, uri, ...aTarget
- An optional target param.IOException
- In case of IO failure.