Search in sources :

Example 1 with SamplingDesignFileColumn

use of org.openforis.collect.io.metadata.samplingdesign.SamplingDesignFileColumn in project collect by openforis.

the class SamplingDesignImportProcessIntegrationTest method containsError.

protected boolean containsError(List<ParsingError> errors, long row, SamplingDesignFileColumn[] columns, ErrorType type) {
    String[] colNames = new String[columns.length];
    for (int i = 0; i < columns.length; i++) {
        SamplingDesignFileColumn col = columns[i];
        colNames[i] = col.getColumnName();
    }
    for (ParsingError error : errors) {
        if (error.getErrorType() == type && error.getRow() == row && Arrays.equals(colNames, error.getColumns())) {
            return true;
        }
    }
    return false;
}
Also used : SamplingDesignFileColumn(org.openforis.collect.io.metadata.samplingdesign.SamplingDesignFileColumn) ParsingError(org.openforis.collect.io.metadata.parsing.ParsingError)

Aggregations

ParsingError (org.openforis.collect.io.metadata.parsing.ParsingError)1 SamplingDesignFileColumn (org.openforis.collect.io.metadata.samplingdesign.SamplingDesignFileColumn)1