Package com.complexible.stardog.icv
Interface ValidationReporter
public interface ValidationReporter
Interface to generate a SHACL validation report. Follows a builder pattern to configure the parameters of validation report generation and provides various different terminal functions for retrieving the report:
results()- Returns an iterator ofValidationResultsreport()- Returns an iterator of triples the correspond to the RDF serialization of the reportreport(RDFHandler)- Passes the RDF serialization of the report to a handler
Any of these functions can be called for processing the validation results. But each call will perform the validation again and subsequent values might return different results if the database and/or the constraints change between those two calls. The results are returned in a streaming fashion as reported by the server.
- Since:
- 6.1.2
- Version:
- 6.2.0
- Author:
- Evren Sirin
-
Method Summary
Modifier and TypeMethodDescriptiondefault ValidationReporterconstraint(Constraint constraint) Validate only the given constraint ignoring other constraints stored in the database.constraints(Collection<Constraint> theConstraints) Validate only the given constraints ignoring other constraints stored in the database.countLimit(int limit) Limits the number of validation results returned by the explainer.graphs(Collection<IRI> graphs) Validate only the given named graphs ignoring information in other named graphs.default ValidationReporterValidate only the given RDF node ignoring other nodes stored in the database.nodes(Collection<Value> nodes) Validate only the given RDF nodes ignoring other nodes stored in the database.Set an configuration option for the validator.options()Get configuration options for the reporter.Set configuration options for the reporter.report()Returns the triples for the validation report.voidreport(RDFHandler handler) Pass the triples of the validation report to the provided handler.CloseableIterator<com.complexible.stardog.icv.shacl.ValidationResult> results()Returns thevalidation results.default ValidationReporterValidate only the given shape ignoring any other shape.shapeGraphs(Collection<IRI> shapeGraphs) Validate only the shapes with supplied contexts.shapes(Collection<IRI> shapes) Validate only the given shapes ignoring any other shape.
-
Method Details
-
countLimit
Limits the number of validation results returned by the explainer. By default, there is no limit.- Returns:
- this reporter
-
graphs
Validate only the given named graphs ignoring information in other named graphs.- Returns:
- this reporter
-
shape
Validate only the given shape ignoring any other shape. The given IRI should identify a shape in the stored constraints.- Returns:
- this reporter
-
shapes
Validate only the given shapes ignoring any other shape. The given IRIs should identify shapes in the stored constraints.- Returns:
- this reporter
-
shapeGraphs
Validate only the shapes with supplied contexts.- Returns:
- this reporter
-
constraint
Validate only the given constraint ignoring other constraints stored in the database.- Returns:
- this reporter
-
constraints
Validate only the given constraints ignoring other constraints stored in the database.- Returns:
- this reporter
-
node
Validate only the given RDF node ignoring other nodes stored in the database.- Returns:
- this reporter
-
nodes
Validate only the given RDF nodes ignoring other nodes stored in the database.- Returns:
- this reporter
-
option
Set an configuration option for the validator.- Type Parameters:
T- type of the option value- Parameters:
option- the option to setvalue- the option value- Returns:
- this reporter
- See Also:
-
options
Set configuration options for the reporter.- Parameters:
options- options to set- Returns:
- this reporter
-
options
Options options()Get configuration options for the reporter.- Returns:
- options
-
report
Returns the triples for the validation report.- Throws:
StardogException
-
report
Pass the triples of the validation report to the provided handler. TheRDFHandler.start()andRDFHandler.end()functions should be called by the caller.- Throws:
StardogException
-
results
CloseableIterator<com.complexible.stardog.icv.shacl.ValidationResult> results()Returns thevalidation results.
-