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.
@FunctionalInterface public interface SchemaViolationHandlerInterface that allows us to plugin behaviour around warnings and errors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSchemaViolationHandler.FailureType
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidhandle(java.util.Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures, AdaptrisMessage msg)Handle any schema violations.default java.lang.StringtoString(java.util.Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures)Return a string representation of the failures.
-
-
-
Method Detail
-
handle
void handle(java.util.Collection<uk.gov.nationalarchives.csv.validator.api.java.FailMessage> failures, AdaptrisMessage msg) throws InterlokExceptionHandle any schema violations.- Parameters:
failures- the failures representing the violations, non-null.msg- the adaptris message- Throws:
InterlokException
-
toString
default java.lang.String toString(java.util.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'
-
-