Package org.openjump.core.ui.io.file
Class AbstractFileLayerLoader
- java.lang.Object
-
- org.openjump.core.ui.io.file.AbstractFileLayerLoader
-
- All Implemented Interfaces:
FileLayerLoader
- Direct Known Subclasses:
DataSourceFileLayerLoader,ReferencedImageFactoryFileLayerLoader
public abstract class AbstractFileLayerLoader extends Object implements FileLayerLoader
A base implementation ofFileLayerLoader.- Author:
- Paul Austin
-
-
Field Summary
Fields Modifier and Type Field Description static ComparatorPRIO_COMPARATOR-
Fields inherited from interface org.openjump.core.ui.io.file.FileLayerLoader
KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractFileLayerLoader()default constructor for xml persistenceAbstractFileLayerLoader(String description, List<String> extensions)Construct a new AbstractFileLayerLoader with a description and list of extensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddFileExtensions(List<String> newexts)Add to the list of file extensions supported by the plug-in.voidaddOption(String name, String type, boolean required)Add an option.voidaddOption(String name, String type, Object defaultValue, boolean required)Add an option.StringgetDescription()Get the descriptive name of the file format (e.g.Collection<String>getFileExtensions()Get the list of file extensions supported by the plug-in.List<Option>getOptionMetadata()Get the list of Options supported by the plug-in.booleanremoveOption(String name, String type, boolean required)Remove an option.booleanremoveOption(String name, String type, Object defaultValue, boolean required)Remove an option.StringtoString()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
-
-
-
-
Field Detail
-
PRIO_COMPARATOR
public static final Comparator PRIO_COMPARATOR
-
-
Method Detail
-
getDescription
public String getDescription()
Get the descriptive name of the file format (e.g. ESRI Shapefile).- Specified by:
getDescriptionin interfaceFileLayerLoader- Returns:
- The file format name.
-
getFileExtensions
public Collection<String> getFileExtensions()
Get the list of file extensions supported by the plug-in.- Specified by:
getFileExtensionsin interfaceFileLayerLoader- Returns:
- The list of file extensions.
-
addFileExtensions
public boolean addFileExtensions(List<String> newexts)
Add to the list of file extensions supported by the plug-in.- Parameters:
newexts- list of extensions- Returns:
- true on success
-
addOption
public void addOption(String name, 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
-
addOption
public void addOption(String name, String type, Object defaultValue, boolean required)
Add an option.- Parameters:
name- The name of the option.type- The type of the option.defaultValue- The defaultValue of the option.required- True if a value for the option is required.- See Also:
Option
-
removeOption
public boolean removeOption(String name, String type, boolean required)
Remove 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.- Returns:
- true if this list contained the specified option
- See Also:
Option
-
removeOption
public boolean removeOption(String name, String type, Object defaultValue, boolean required)
Remove an option.- Parameters:
name- The name of the option.type- The type of the option.defaultValue- The defaultValue of the option.required- True if a value for the option is required.- See Also:
Option
-
getOptionMetadata
public List<Option> getOptionMetadata()
Get the list of Options supported by the plug-in.- Specified by:
getOptionMetadatain interfaceFileLayerLoader- Returns:
- The list of Options.
-
-