Search in sources :

Example 1 with NewBackupFileExtractor

use of org.openforis.collect.io.NewBackupFileExtractor in project collect by openforis.

the class XMLDataImportProcess method beforeStart.

private void beforeStart() throws ZipException, IOException {
    backupFileExtractor = new NewBackupFileExtractor(file);
    backupFileExtractor.init();
}
Also used : NewBackupFileExtractor(org.openforis.collect.io.NewBackupFileExtractor)

Example 2 with NewBackupFileExtractor

use of org.openforis.collect.io.NewBackupFileExtractor in project collect by openforis.

the class XMLParsingRecordProvider method init.

@Override
public void init(ProgressListener progressListener) throws Exception {
    this.backupFileExtractor = new NewBackupFileExtractor(file);
    this.backupFileExtractor.init(progressListener);
    this.dataUnmarshaller = new DataUnmarshaller(existingSurvey == null ? packagedSurvey : existingSurvey, packagedSurvey);
    this.dataUnmarshaller.setRecordValidationEnabled(validateRecords);
    this.dataUnmarshaller.setIgnoreDuplicateRecordKeyValidationErrors(ignoreDuplicateRecordKeyValidationErrors);
    this.dataUnmarshaller.setRecordApplicationVersion(backupFileExtractor.getInfo().getCollectVersion());
    this.recordUpdater = new RecordUpdater();
    this.recordUpdater.setValidateAfterUpdate(validateRecords);
    initializeRecordUserLoader();
}
Also used : DataUnmarshaller(org.openforis.collect.persistence.xml.DataUnmarshaller) NewBackupFileExtractor(org.openforis.collect.io.NewBackupFileExtractor) RecordUpdater(org.openforis.collect.model.RecordUpdater)

Aggregations

NewBackupFileExtractor (org.openforis.collect.io.NewBackupFileExtractor)2 RecordUpdater (org.openforis.collect.model.RecordUpdater)1 DataUnmarshaller (org.openforis.collect.persistence.xml.DataUnmarshaller)1