Class AbstractFileLoader

    • Field Detail

      • FILE_EXTENSION_COMPRESSED

        public static java.lang.String FILE_EXTENSION_COMPRESSED
        the extension for compressed files
    • Constructor Detail

      • AbstractFileLoader

        public AbstractFileLoader()
    • Method Detail

      • retrieveFile

        public java.io.File retrieveFile()
        get the File specified as the source
        Specified by:
        retrieveFile in interface FileSourcedConverter
        Returns:
        the source file
      • setFile

        public void setFile​(java.io.File file)
                     throws java.io.IOException
        sets the source File
        Specified by:
        setFile in interface FileSourcedConverter
        Parameters:
        file - the source file
        Throws:
        java.io.IOException - if an error occurs
      • setEnvironment

        public void setEnvironment​(Environment env)
        Set the environment variables to use.
        Specified by:
        setEnvironment in interface EnvironmentHandler
        Parameters:
        env - the environment variables to use
      • reset

        public void reset()
                   throws java.io.IOException
        Resets the loader ready to read a new data set
        Specified by:
        reset in interface Loader
        Overrides:
        reset in class AbstractLoader
        Throws:
        java.io.IOException - if something goes wrong
      • setSource

        public void setSource​(java.io.File file)
                       throws java.io.IOException
        Resets the Loader object and sets the source of the data set to be the supplied File object.
        Specified by:
        setSource in interface Loader
        Overrides:
        setSource in class AbstractLoader
        Parameters:
        file - the source file.
        Throws:
        java.io.IOException - if an error occurs
      • useRelativePathTipText

        public java.lang.String useRelativePathTipText()
        Tip text suitable for displaying int the GUI
        Returns:
        a description of this property as a String
      • setUseRelativePath

        public void setUseRelativePath​(boolean rp)
        Set whether to use relative rather than absolute paths
        Specified by:
        setUseRelativePath in interface FileSourcedConverter
        Parameters:
        rp - true if relative paths are to be used
      • getUseRelativePath

        public boolean getUseRelativePath()
        Gets whether relative paths are to be used
        Specified by:
        getUseRelativePath in interface FileSourcedConverter
        Returns:
        true if relative paths are to be used
      • runFileLoader

        public static void runFileLoader​(AbstractFileLoader loader,
                                         java.lang.String[] options)
        runs the given loader with the provided options
        Parameters:
        loader - the loader to run
        options - the commandline options, first argument must be the file to load