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 of FileLayerLoader.
Author:
Paul Austin
  • Field Details

    • PRIO_COMPARATOR

      public static final Comparator PRIO_COMPARATOR
  • Constructor Details

    • AbstractFileLayerLoader

      public AbstractFileLayerLoader()
      default constructor for xml persistence
    • AbstractFileLayerLoader

      public AbstractFileLayerLoader(String description, List<String> extensions)
      Construct a new AbstractFileLayerLoader with a description and list of extensions.
      Parameters:
      description - The format description.
      extensions - The supported file extension.
  • Method Details

    • getDescription

      public 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 Collection<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.
    • 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:
    • 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:
    • 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:
    • 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:
    • getOptionMetadata

      public 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 String toString()
      Return a string representation of the loader.
      Overrides:
      toString in class Object
      Returns:
      The string.