Package interlok.csv.schema
Interface SchemaViolationHandler
- All Known Implementing Classes:
ErrorsAsMetadata,FailOnError,FailOnWarningOrError,FailuresAsMetadata,IgnoreViolations,ViolationsAsMetadata
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface that allows us to plugin behaviour around warnings and errors.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures, AdaptrisMessage msg) Handle any schema violations.default StringtoString(Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures) Return a string representation of the failures.
-
Method Details
-
handle
void handle(Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures, AdaptrisMessage msg) throws InterlokException Handle any schema violations.- Parameters:
failures- the failures representing the violations, non-null.msg- the adaptris message- Throws:
InterlokException
-
toString
default String toString(Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures) Return a string representation of the failures.- Parameters:
failures- the failures representing the violations, non-null.- Returns:
- the string representation
- Implementation Note:
- The default implementation is return a new line separated list of the failures in the form
'[line][column]:message'
-