Search in sources :

Example 1 with SurveyBackupVerifierTask

use of org.openforis.collect.io.internal.SurveyBackupVerifierTask in project collect by openforis.

the class SurveyBackupInfoExtractorJob method initializeTask.

@Override
protected void initializeTask(Worker task) {
    if (task instanceof SurveyBackupVerifierTask) {
        SurveyBackupVerifierTask t = (SurveyBackupVerifierTask) task;
        t.setZipFile(zipFile);
    } else if (task instanceof SurveyBackupInfoExtractorTask) {
        File infoFile = backupFileExtractor.extractInfoFile();
        SurveyBackupInfoExtractorTask t = (SurveyBackupInfoExtractorTask) task;
        t.setFile(infoFile);
    } else if (task instanceof IdmlUnmarshallTask) {
        File idmlFile = zipFile == null ? file : backupFileExtractor.extractIdmlFile();
        IdmlUnmarshallTask t = (IdmlUnmarshallTask) task;
        t.setSurveyManager(surveyManager);
        t.setValidate(validate);
        t.setFile(idmlFile);
    }
}
Also used : SurveyBackupInfoExtractorTask(org.openforis.collect.io.internal.SurveyBackupInfoExtractorTask) SurveyBackupVerifierTask(org.openforis.collect.io.internal.SurveyBackupVerifierTask) IdmlUnmarshallTask(org.openforis.collect.io.metadata.IdmlUnmarshallTask) File(java.io.File) ZipFile(java.util.zip.ZipFile)

Aggregations

File (java.io.File)1 ZipFile (java.util.zip.ZipFile)1 SurveyBackupInfoExtractorTask (org.openforis.collect.io.internal.SurveyBackupInfoExtractorTask)1 SurveyBackupVerifierTask (org.openforis.collect.io.internal.SurveyBackupVerifierTask)1 IdmlUnmarshallTask (org.openforis.collect.io.metadata.IdmlUnmarshallTask)1