Class ImportingJob


  • public class ImportingJob
    extends Object
    • Field Detail

      • id

        public final long id
      • dir

        public final File dir
      • lastTouched

        public long lastTouched
      • updating

        public boolean updating
      • canceled

        public boolean canceled
    • Constructor Detail

      • ImportingJob

        public ImportingJob​(long id,
                            File dir)
    • Method Detail

      • setState

        public void setState​(String state)
      • setError

        public void setError​(List<Exception> exceptions)
      • setProjectID

        public void setProjectID​(long projectID)
      • setProgress

        public void setProgress​(int percent,
                                String message)
      • setFileSelection

        public void setFileSelection​(List<Integer> fileSelectionArray)
      • getFileSelection

        public List<Integer> getFileSelection()
      • setRankedFormats

        public void setRankedFormats​(List<String> rankedFormats)
      • touch

        public void touch()
      • setProject

        public void setProject​(Project newProject)
      • getProject

        public Project getProject()
      • dispose

        public void dispose()
      • getRawDataDir

        public File getRawDataDir()
      • getCommonFormatForSelectedFiles

        public String getCommonFormatForSelectedFiles()
        Returns the most common format among the selected files.
        Returns:
        the most common format found, or null if no format could be guessed.
      • guessBetterFormat

        public String guessBetterFormat​(String bestFormat)
        Guesses a better format by inspecting the first file to import with format guessers.
        Parameters:
        bestFormat - the best format guessed so far
        Returns:
        any better format, or the current best format
      • autoSelectFiles

        public String autoSelectFiles()
        Figure out the best (most common) format for the set of files, select all files which match that format, and return the format found.
        Returns:
        best (highest frequency) format
      • updateWithNewFileSelection

        public void updateWithNewFileSelection​(List<Integer> fileSelectionArray)