org.openjump.core.ui.io.file
Class AbstractFileLayerLoader

java.lang.Object
  extended by org.openjump.core.ui.io.file.AbstractFileLayerLoader
All Implemented Interfaces:
FileLayerLoader
Direct Known Subclasses:
DataSourceFileLayerLoader, ReferencedImageFactoryFileLayerLoader

public abstract class AbstractFileLayerLoader
extends java.lang.Object
implements FileLayerLoader

A base implementation of FileLayerLoader.

Author:
Paul Austin

Field Summary
 
Fields inherited from interface org.openjump.core.ui.io.file.FileLayerLoader
KEY
 
Constructor Summary
AbstractFileLayerLoader(java.lang.String description, java.util.List<java.lang.String> extensions)
          Construct a new AbstractFileLayerLoader with a description and list of extensions.
 
Method Summary
 void addOption(java.lang.String name, java.lang.String type, boolean required)
          Add an option.
 java.lang.String getDescription()
          Get the descriptive name of the file format (e.g.
 java.util.Collection<java.lang.String> getFileExtensions()
          Get the list of file extensions supported by the plug-in.
 java.util.List<Option> getOptionMetadata()
          Get the list of Options supported by the plug-in.
 java.lang.String toString()
          Return a string representation of the loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openjump.core.ui.io.file.FileLayerLoader
open
 

Constructor Detail

AbstractFileLayerLoader

public AbstractFileLayerLoader(java.lang.String description,
                               java.util.List<java.lang.String> extensions)
Construct a new AbstractFileLayerLoader with a description and list of extensions.

Parameters:
description - The format description.
extensions - The supported file extension.
Method Detail

getDescription

public java.lang.String getDescription()
Get the descriptive name of the file format (e.g. ESRI Shapefile).

Specified by:
getDescription in interface FileLayerLoader
Returns:
The file format name.

getFileExtensions

public java.util.Collection<java.lang.String> getFileExtensions()
Get the list of file extensions supported by the plug-in.

Specified by:
getFileExtensions in interface FileLayerLoader
Returns:
The list of file extensions.

addOption

public void addOption(java.lang.String name,
                      java.lang.String type,
                      boolean required)
Add an option.

Parameters:
name - The name of the option.
type - The type of the option.
required - True if a value for the option is required.
See Also:
Option

getOptionMetadata

public java.util.List<Option> getOptionMetadata()
Get the list of Options supported by the plug-in.

Specified by:
getOptionMetadata in interface FileLayerLoader
Returns:
The list of Options.

toString

public java.lang.String toString()
Return a string representation of the loader.

Overrides:
toString in class java.lang.Object
Returns:
The string.