use of org.openforis.concurrency.Worker in project collect by openforis.
the class CSVDataImportJob method getParsingErrors.
public List<DataParsingError> getParsingErrors() {
List<DataParsingError> result = new ArrayList<DataParsingError>();
for (Worker worker : getTasks()) {
CSVDataImportTask task = (CSVDataImportTask) worker;
ReferenceDataImportStatus<ParsingError> dataImportStatus = task.getDataImportStatus();
if (dataImportStatus != null) {
List<ParsingError> errors = dataImportStatus.getErrors();
for (ParsingError parsingError : errors) {
DataParsingError dataParsingError = new DataParsingError(task.getInput().getFile().getName(), parsingError.getRow(), parsingError.getErrorType(), parsingError.getColumns(), parsingError.getMessage(), parsingError.getMessageArgs());
result.add(dataParsingError);
}
}
}
return result;
}
Aggregations