Validator
Validator object capable of extracting data from a Stream and produce a stream of ValidationResults
The whole validation pipeline is done through FS2 streams, and flows as follows:
-
A => RDF data: a Stream of data is received as instances of A that are parsed for RDF data (this functionality is delegated to StreamExtractors)
-
RDF data => Validation Report => The parsed data is validated and the ValidationReports included on a new Stream
-
Validation Report => Validation Result: The validated data is formatted and wrapped into instances of ValidationResult
- Type parameters:
- A
Type of the items being received via Stream and thus feeding the validator
- Value parameters:
- configuration
Configuration of this validator instance
- extractor
Extractor providing access to the incoming RDF items
- Throws:
- StreamValidationException
When invalid or erroring items are found and the stream is configured to stop in such cases
Value members
Constructors
Concrete methods
Main method of the validator, produces a Stream of validation results from input data, fetching and processing items as specified in this validator's configurations
Main method of the validator, produces a Stream of validation results from input data, fetching and processing items as specified in this validator's configurations
Error handling: see "throws" section. Also, it is highly encouraged to handle any other possible exception that might happen
- Returns:
A Stream of ValidationResults to be further processed by third parties
- Throws:
- KafkaException
When using a Kafka extractor and any kafka-related failure occurs (i.e.: underlying Kafka consumer cannot be built, connection fails, server goes offline...)
- StreamTimeoutException
If the time between received items exceeds the one configured in the extractor
- StreamValidationException
when errored/invalid results are emitted but are not allowed in the configuration
Concrete fields
Schema against which this validator's data is validated
Schema against which this validator's data is validated