Class AbstractFileSplitter

    • Field Detail

      • m_Extension

        protected String m_Extension
        the file extension to use.
      • m_NumDigits

        protected int m_NumDigits
        the number of digits to use for the index of output files.
      • m_Stopped

        protected boolean m_Stopped
        whether the splitting has been stopped.
      • m_Generated

        protected List<File> m_Generated
        the files that were generated.
    • Constructor Detail

      • AbstractFileSplitter

        public AbstractFileSplitter()
    • Method Detail

      • setPrefix

        public void setPrefix​(PlaceholderFile value)
        Sets the prefix for the generated files.
        Parameters:
        value - the prefix
      • getPrefix

        public PlaceholderFile getPrefix()
        Returns the prefix for the generated files.
        Returns:
        the prefix
      • prefixTipText

        public String prefixTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setExtension

        public void setExtension​(String value)
        Sets the extension for the generated files.
        Parameters:
        value - the extension
      • getExtension

        public String getExtension()
        Returns the extension for the generated files.
        Returns:
        the extension
      • extensionTipText

        public String extensionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNumDigits

        public void setNumDigits​(int value)
        Sets the number of digits to use for the index of the generated files.
        Parameters:
        value - the number of digits
      • getNumDigits

        public int getNumDigits()
        Returns the number of digits to use for the index of the generated files.
        Returns:
        the number of digits
      • numDigitsTipText

        public String numDigitsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • check

        protected void check​(PlaceholderFile file)
        Performs checks on the file.

        Default implementation only ensures that the file is present and not a directory.
        Parameters:
        file - the file to check
      • nextFile

        protected File nextFile()
        Creates a new filename, automatically adding it to the list of generated files.
        Returns:
        the next file
      • doSplit

        protected abstract void doSplit​(PlaceholderFile file)
        Performs the actual splitting of the file.
        Parameters:
        file - the file to split
      • split

        public String[] split​(PlaceholderFile file)
        Splits the file and returns the filenames of the generated files.
        Parameters:
        file - the file to split
        Returns:
        the filenames of the new files generated
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable