ValidObservation validOb = validator.validate();
if (validOb != null) {
addValidObservation(validOb, lineNum);
}
} catch (ObservationValidationError e) {
InvalidObservation invalidOb = new InvalidObservation(
validator.getRawRecord(), e.getMessage());
invalidOb.setRecordNumber(lineNum);
addInvalidObservation(invalidOb);
} catch (ObservationValidationWarning e) {
InvalidObservation invalidOb = new InvalidObservation(
validator.getRawRecord(), e.getMessage(), true);
invalidOb.setRecordNumber(lineNum);
addInvalidObservation(invalidOb);
addValidObservation(e.getObservation(), lineNum);
}
}