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 of ValidationResults
    • report() - Returns an iterator of triples the correspond to the RDF serialization of the report
    • report(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 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 set
        value - 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
      • results

        CloseableIterator<com.complexible.stardog.icv.shacl.ValidationResult> results()
        Returns the validation results.