Class ConstraintViolation
- java.lang.Object
-
- com.atomgraph.spinrdf.constraints.ConstraintViolation
-
public class ConstraintViolation extends Object
- Author:
- Martynas Jusevičius <martynas@atomgraph.com>
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<TemplateCall>getFixes()org.apache.jena.rdf.model.ResourcegetLevel()StringgetMessage()Collection<SimplePropertyPath>getPaths()org.apache.jena.rdf.model.ResourcegetRoot()org.apache.jena.rdf.model.ResourcegetSource()Gets 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)StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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)
-
-