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 ofValidationResult
sreport()
- 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ValidationReporter
constraint(Constraint constraint)
Validate only the given constraint ignoring other constraints stored in the database.ValidationReporter
constraints(java.util.Collection<Constraint> theConstraints)
Validate only the given constraints ignoring other constraints stored in the database.ValidationReporter
countLimit(int limit)
Limits the number of validation results returned by the explainer.ValidationReporter
graphs(java.util.Collection<IRI> graphs)
Validate only the given named graphs ignoring information in other named graphs.default ValidationReporter
node(Value node)
Validate only the given RDF node ignoring other nodes stored in the database.ValidationReporter
nodes(java.util.Collection<Value> nodes)
Validate only the given RDF nodes ignoring other nodes stored in the database.<T> ValidationReporter
option(Option<T> option, T value)
Set an configuration option for the validator.Options
options()
Get configuration options for the reporter.ValidationReporter
options(Options options)
Set configuration options for the reporter.StatementIterator
report()
Returns the triples for the validation report.void
report(RDFHandler handler)
Pass the triples of the validation report to the provided handler.CloseableIterator<com.complexible.stardog.icv.shacl.ValidationResult>
results()
Returns thevalidation result
s.default ValidationReporter
shape(IRI shape)
Validate only the given shape ignoring any other shape.ValidationReporter
shapeGraphs(java.util.Collection<IRI> shapeGraphs)
Validate only the shapes with supplied contexts.ValidationReporter
shapes(java.util.Collection<IRI> shapes)
Validate only the given shapes ignoring any other shape.
-
-
-
Method Detail
-
countLimit
ValidationReporter countLimit(int limit)
Limits the number of validation results returned by the explainer. By default, there is no limit.- Returns:
- this reporter
-
graphs
ValidationReporter graphs(java.util.Collection<IRI> graphs)
Validate only the given named graphs ignoring information in other named graphs.- Returns:
- this reporter
-
shape
default ValidationReporter shape(IRI 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
ValidationReporter shapes(java.util.Collection<IRI> shapes)
Validate only the given shapes ignoring any other shape. The given IRIs should identify shapes in the stored constraints.- Returns:
- this reporter
-
shapeGraphs
ValidationReporter shapeGraphs(java.util.Collection<IRI> shapeGraphs)
Validate only the shapes with supplied contexts.- Returns:
- this reporter
-
constraint
default ValidationReporter constraint(Constraint constraint)
Validate only the given constraint ignoring other constraints stored in the database.- Returns:
- this reporter
-
constraints
ValidationReporter constraints(java.util.Collection<Constraint> theConstraints)
Validate only the given constraints ignoring other constraints stored in the database.- Returns:
- this reporter
-
node
default ValidationReporter node(Value node)
Validate only the given RDF node ignoring other nodes stored in the database.- Returns:
- this reporter
-
nodes
ValidationReporter nodes(java.util.Collection<Value> nodes)
Validate only the given RDF nodes ignoring other nodes stored in the database.- Returns:
- this reporter
-
option
<T> ValidationReporter option(Option<T> option, T value)
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:
ValidationOptions
-
options
ValidationReporter options(Options 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
StatementIterator report() throws StardogException
Returns the triples for the validation report.- Throws:
StardogException
-
report
void report(RDFHandler handler) throws StardogException
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 result
s.
-
-