org.openjump.core.ui.io.file
Class DataSourceFileLayerLoader
java.lang.Object
org.openjump.core.ui.io.file.AbstractFileLayerLoader
org.openjump.core.ui.io.file.DataSourceFileLayerLoader
- All Implemented Interfaces:
- FileLayerLoader
public class DataSourceFileLayerLoader
- extends AbstractFileLayerLoader
The DataSourceFileLayerLoader is an implementation of FileLayerLoader
that wraps an existing file based DataSource class.
- Author:
- Paul Austin
|
Constructor Summary |
DataSourceFileLayerLoader(WorkbenchContext workbenchContext,
java.lang.Class dataSourceClass,
java.lang.String description,
java.util.List<java.lang.String> extensions)
Construct a new DataSourceFileLayerLoader. |
|
Method Summary |
boolean |
open(TaskMonitor monitor,
java.net.URI uri,
java.util.Map<java.lang.String,java.lang.Object> options)
Open the file specified by the URI with the map of option values. |
protected java.util.Map<java.lang.String,java.lang.Object> |
toProperties(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.Object> options)
Convert the URI and map of options for the data source. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DataSourceFileLayerLoader
public DataSourceFileLayerLoader(WorkbenchContext workbenchContext,
java.lang.Class dataSourceClass,
java.lang.String description,
java.util.List<java.lang.String> extensions)
- Construct a new DataSourceFileLayerLoader.
- Parameters:
workbenchContext - The workbench context.dataSourceClass - The DataSource class.description - The file format name.extensions - The list of supported extensions.
open
public boolean open(TaskMonitor monitor,
java.net.URI uri,
java.util.Map<java.lang.String,java.lang.Object> options)
- Open the file specified by the URI with the map of option values.
- Parameters:
monitor - The TaskMonitor.uri - The URI to the file to load.options - The map of options.
- Returns:
- True if the file could be loaded false otherwise.
toProperties
protected java.util.Map<java.lang.String,java.lang.Object> toProperties(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.Object> options)
- Convert the URI and map of options for the data source. If the URI is a ZIP
uri the File option will be set to the ZIP file name and the CompressedFile
set to the entry in the ZIP file.
- Parameters:
uri - The URI to the file.options - The selected options.
- Returns:
- The options.