Class ConstraintViolation
java.lang.Object
com.atomgraph.spinrdf.constraints.ConstraintViolation
- Author:
- Martynas Jusevičius <martynas@atomgraph.com>
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintViolation(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. -
Method Summary
Modifier and TypeMethodDescriptiongetFixes()org.apache.jena.rdf.model.ResourcegetLevel()getPaths()org.apache.jena.rdf.model.ResourcegetRoot()org.apache.jena.rdf.model.ResourceGets the SPIN Query or template call that has caused this violation.org.apache.jena.rdf.model.RDFNodegetValue()booleanisError()Checks if this represents an Error or Fatal.voidsetLevel(org.apache.jena.rdf.model.Resource level) voidsetValue(org.apache.jena.rdf.model.RDFNode value) toString()
-
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 violationpaths- the paths (may be empty)fixes- potential fixes for the violations (may be empty)message- the message explaining the errorsource- the SPIN Query or template call that has caused this violation (may be null)
-
-
Method Details
-
getFixes
-
getLevel
public org.apache.jena.rdf.model.Resource getLevel() -
getMessage
-
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
-