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 Details

    • 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

      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

      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(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(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

      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
    • report

      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. The RDFHandler.start() and RDFHandler.end() functions should be called by the caller.
      Throws:
      StardogException
    • results

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