Class ConstraintViolation

java.lang.Object
com.atomgraph.spinrdf.constraints.ConstraintViolation

public class ConstraintViolation extends Object
Author:
Martynas Jusevičius <martynas@atomgraph.com>
  • Constructor Details

    • ConstraintViolation

      public ConstraintViolation(org.apache.jena.rdf.model.Resource root, Collection<SimplePropertyPath> paths, Collection<TemplateCall> fixes, String message, org.apache.jena.rdf.model.Resource source)
      Constructs a new ConstraintViolation.
      Parameters:
      root - the root resource of the violation
      paths - the paths (may be empty)
      fixes - potential fixes for the violations (may be empty)
      message - the message explaining the error
      source - the SPIN Query or template call that has caused this violation (may be null)
  • Method Details

    • getFixes

      public Collection<TemplateCall> getFixes()
    • getLevel

      public org.apache.jena.rdf.model.Resource getLevel()
    • getMessage

      public String getMessage()
    • getPaths

      public Collection<SimplePropertyPath> getPaths()
    • getRoot

      public org.apache.jena.rdf.model.Resource getRoot()
    • getSource

      public org.apache.jena.rdf.model.Resource getSource()
      Gets the SPIN Query or template call that has caused this violation.
      Returns:
      the source (code should be robust against null values)
    • getValue

      public org.apache.jena.rdf.model.RDFNode getValue()
    • isError

      public boolean isError()
      Checks if this represents an Error or Fatal.
      Returns:
      true if Error or Fatal
    • setLevel

      public void setLevel(org.apache.jena.rdf.model.Resource level)
    • setValue

      public void setValue(org.apache.jena.rdf.model.RDFNode value)
    • toString

      public String toString()
      Overrides:
      toString in class Object