
net.optionfactory.csv.parser.CsvParsingProblem Maven / Gradle / Ivy
The newest version!
package net.optionfactory.csv.parser;
public class CsvParsingProblem {
public CsvParsingProblemType type;
public String context;
public String reason;
public Object details;
public static CsvParsingProblem of(CsvParsingProblemType type, String context, String reason, Object details) {
final CsvParsingProblem problem = new CsvParsingProblem();
problem.type = type;
problem.context = context;
problem.reason = reason;
problem.details = details;
return problem;
}
@Override
public String toString() {
return String.format("%s@%s: %s (%s)", type, context, reason, details);
}
public enum CsvParsingProblemType{
MISSING_SCHEMA, UNPARSEABLE_SCHEMA, UNPARSEABLE_RECORD, SCHEMA_VIOLATION
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy