first steps for header validation

This commit is contained in:
Andreas Billmann
2015-12-04 16:22:21 +01:00
parent 1d5441af4d
commit feabaa70a9
5 changed files with 232 additions and 39 deletions

View File

@@ -89,6 +89,7 @@ public class CSVModel {
*/
public void setHeader(String[] header) {
this.header = header;
revalidate();
}
/**
@@ -104,6 +105,10 @@ public class CSVModel {
* walks through the data and validates each value
*/
private void revalidate() {
if (header != null) {
validator.isHeaderValid(header);
}
for (CSVRow row: rows) {
row.setValidator(validator);
for (String column: row.getColumns().keySet()) {