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
- Companion:
- object
- Source:
- Validator.scala
Type members
Types
Value members
Constructors
Alternative constructor, automatically build the validator configuration given a schema and a trigger
Alternative constructor, automatically build the validator configuration given a schema and a trigger
- Source:
- Validator.scala
Concrete methods
Stream transformation pipe in charge of transforming RDF validation reports to the final instances of ValidationResult emitted by the validator
Stream transformation pipe in charge of transforming RDF validation reports to the final instances of ValidationResult emitted by the validator
- Returns:
A new transformed stream: Validation Report => Validation Result
- Source:
- Validator.scala
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
- Source:
- Validator.scala
Stream transformation pipe in charge of validating RDF items and emitting the resulting validation reports
Stream transformation pipe in charge of validating RDF items and emitting the resulting validation reports
- Returns:
A new transformed stream: RDF data => Validation Report
- Source:
- Validator.scala
Concrete fields
Data format expected by this this validator
Data format expected by this this validator
- Source:
- Validator.scala
Data inference applied by this this validator
Data inference applied by this this validator
- Source:
- Validator.scala
Source from which this validator's data arrives
Source from which this validator's data arrives
- Source:
- Validator.scala
Schema against which this validator's data is validated
Schema against which this validator's data is validated
- Source:
- Validator.scala
Validation trigger with which this validator's data is validated
Validation trigger with which this validator's data is validated
For ShapeMaps, it will be fully filled with the data and schema prefix maps before validation (see validateItems)
- Source:
- Validator.scala