Package org.openrefine.importing
Class ImportingJob
- java.lang.Object
-
- org.openrefine.importing.ImportingJob
-
public class ImportingJob extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImportingJob.ImportingJobConfigstatic classImportingJob.RetrievalRecord
-
Field Summary
Fields Modifier and Type Field Description booleancanceledFiledirlongidlonglastTouchedProjectMetadatametadatabooleanupdating
-
Constructor Summary
Constructors Constructor Description ImportingJob(long id, File dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringautoSelectFiles()Figure out the best (most common) format for the set of files, select all files which match that format, and return the format found.voiddispose()StringgetCommonFormatForSelectedFiles()Returns the most common format among the selected files.List<Integer>getFileSelection()ImportingJob.ImportingJobConfiggetJsonConfig()ProjectgetProject()FilegetRawDataDir()ImportingJob.RetrievalRecordgetRetrievalRecord()List<ImportingFileRecord>getSelectedFileRecords()StringguessBetterFormat(String bestFormat)Guesses a better format by inspecting the first file to import with format guessers.voidsetError(List<Exception> exceptions)voidsetFileSelection(List<Integer> fileSelectionArray)voidsetProgress(int percent, String message)voidsetProject(Project newProject)voidsetProjectID(long projectID)voidsetRankedFormats(List<String> rankedFormats)voidsetState(String state)voidtouch()voidupdateWithNewFileSelection(List<Integer> fileSelectionArray)
-
-
-
Field Detail
-
id
public final long id
-
dir
public final File dir
-
metadata
public ProjectMetadata metadata
-
lastTouched
public long lastTouched
-
updating
public boolean updating
-
canceled
public boolean canceled
-
-
Constructor Detail
-
ImportingJob
public ImportingJob(long id, File dir)
-
-
Method Detail
-
getJsonConfig
public ImportingJob.ImportingJobConfig getJsonConfig()
-
setState
public void setState(String state)
-
setProjectID
public void setProjectID(long projectID)
-
setProgress
public void setProgress(int percent, String message)
-
getRetrievalRecord
public ImportingJob.RetrievalRecord getRetrievalRecord()
-
getSelectedFileRecords
public List<ImportingFileRecord> getSelectedFileRecords()
-
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
-
-