Class ShaclValidator.BuilderWithShapes

java.lang.Object
org.eclipse.rdf4j.sail.shacl.ShaclValidator.BuilderWithShapes
All Implemented Interfaces:
Cloneable
Enclosing class:
ShaclValidator

public static class ShaclValidator.BuilderWithShapes extends Object implements Cloneable
  • Field Details

    • shapes

      public Sail shapes
      The shapes sail used for validation.
  • Method Details

    • build

      Build a validator that validates data against the configured shapes.
      Returns:
      a validator bound to the shapes sail
    • clone

    • shapeContexts

      public ShaclValidator.BuilderWithShapes shapeContexts(Resource... shapeContexts)
      Set the contexts to use when discovering SHACL shapes.
      Parameters:
      shapeContexts - contexts to scan, or null to scan all contexts
      Returns:
      this builder instance
    • setGlobalLogValidationExecution

      public ShaclValidator.BuilderWithShapes setGlobalLogValidationExecution(boolean loggingEnabled)
      Enable or disable global logging of validation execution.
      Parameters:
      loggingEnabled - whether to enable logging
      Returns:
      this builder instance
    • setLogValidationViolations

      public ShaclValidator.BuilderWithShapes setLogValidationViolations(boolean logValidationViolations)
      Enable or disable logging of validation violations.
      Parameters:
      logValidationViolations - whether to log violations
      Returns:
      this builder instance
    • setParallelValidation

      public ShaclValidator.BuilderWithShapes setParallelValidation(boolean parallelValidation)
      Enable or disable parallel validation.
      Parameters:
      parallelValidation - whether to run validation in parallel
      Returns:
      this builder instance
    • setCacheSelectNodes

      public ShaclValidator.BuilderWithShapes setCacheSelectNodes(boolean cacheSelectNodes)
      Enable or disable caching of select nodes during validation.
      Parameters:
      cacheSelectNodes - whether to cache select nodes
      Returns:
      this builder instance
    • setRdfsSubClassReasoning

      public ShaclValidator.BuilderWithShapes setRdfsSubClassReasoning(boolean rdfsSubClassReasoning)
      Enable or disable RDFS subclass reasoning during validation.
      Parameters:
      rdfsSubClassReasoning - whether to enable subclass reasoning
      Returns:
      this builder instance
    • setIncludeInferredStatements

      public ShaclValidator.BuilderWithShapes setIncludeInferredStatements(boolean includeInferredStatements)
      Enable or disable inclusion of inferred statements during validation.
      Parameters:
      includeInferredStatements - whether to include inferred statements
      Returns:
      this builder instance
    • disableValidation

      public ShaclValidator.BuilderWithShapes disableValidation()
      Disable SHACL validation entirely.
      Returns:
      this builder instance
    • enableValidation

      public ShaclValidator.BuilderWithShapes enableValidation()
      Enable SHACL validation.
      Returns:
      this builder instance
    • setLogValidationPlans

      public ShaclValidator.BuilderWithShapes setLogValidationPlans(boolean logValidationPlans)
      Enable or disable logging of validation plans.
      Parameters:
      logValidationPlans - whether to log validation plans
      Returns:
      this builder instance
    • setPerformanceLogging

      public ShaclValidator.BuilderWithShapes setPerformanceLogging(boolean performanceLogging)
      Enable or disable performance logging during validation.
      Parameters:
      performanceLogging - whether to log performance details
      Returns:
      this builder instance
    • setSerializableValidation

      public ShaclValidator.BuilderWithShapes setSerializableValidation(boolean serializableValidation)
      Enable or disable serializable validation mode.
      Parameters:
      serializableValidation - whether to enable serializable validation
      Returns:
      this builder instance
    • setEclipseRdf4jShaclExtensions

      public ShaclValidator.BuilderWithShapes setEclipseRdf4jShaclExtensions(boolean eclipseRdf4jShaclExtensions)
      Enable or disable RDF4J SHACL extensions.
      Parameters:
      eclipseRdf4jShaclExtensions - whether to enable the extensions
      Returns:
      this builder instance
    • setDashDataShapes

      public ShaclValidator.BuilderWithShapes setDashDataShapes(boolean dashDataShapes)
      Enable or disable DASH data shapes support.
      Parameters:
      dashDataShapes - whether to enable DASH data shapes
      Returns:
      this builder instance
    • setValidationResultsLimitPerConstraint

      public ShaclValidator.BuilderWithShapes setValidationResultsLimitPerConstraint(long validationResultsLimitPerConstraint)
      Set the maximum number of validation results per constraint.
      Parameters:
      validationResultsLimitPerConstraint - limit per constraint, or a negative value to defer to the total limit
      Returns:
      this builder instance
    • setValidationResultsLimitTotal

      public ShaclValidator.BuilderWithShapes setValidationResultsLimitTotal(long validationResultsLimitTotal)
      Set the total maximum number of validation results in a report.
      Parameters:
      validationResultsLimitTotal - total limit, or a negative value for no limit
      Returns:
      this builder instance
    • setTransactionalValidationLimit

      public ShaclValidator.BuilderWithShapes setTransactionalValidationLimit(long transactionalValidationLimit)
      Set the transactional validation limit.
      Parameters:
      transactionalValidationLimit - the transactional validation limit
      Returns:
      this builder instance
    • setValidationTimeoutMillis

      public ShaclValidator.BuilderWithShapes setValidationTimeoutMillis(long validationTimeoutMillis)
      Set the validation timeout in milliseconds.
      Parameters:
      validationTimeoutMillis - timeout in milliseconds, or a negative value to disable the timeout
      Returns:
      this builder instance
    • setShapesGraphs

      public ShaclValidator.BuilderWithShapes setShapesGraphs(Set<IRI> shapesGraphs)
      Set the SHACL shapes graphs to use when discovering shapes.

      Use RDF4J.NIL or SESAME.NIL to indicate the default graph.

      Parameters:
      shapesGraphs - the shapes graphs, or null to scan all graphs
      Returns:
      this builder instance