Class AbstractSPARQLExecutor
- java.lang.Object
-
- org.topbraid.shacl.validation.sparql.AbstractSPARQLExecutor
-
- All Implemented Interfaces:
ConstraintExecutor
- Direct Known Subclasses:
SPARQLComponentExecutor,SPARQLConstraintExecutor
public abstract class AbstractSPARQLExecutor extends Object implements ConstraintExecutor
-
-
Field Summary
Fields Modifier and Type Field Description static booleancreateSuccessResults
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSPARQLExecutor(Constraint constraint)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddBindings(Constraint constraint, org.apache.jena.query.QuerySolutionMap bindings)static voidaddDetails(org.apache.jena.rdf.model.Resource parentResult, org.apache.jena.rdf.model.Model nestedResults)voidexecuteConstraint(Constraint constraint, ValidationEngine engine, Collection<org.apache.jena.rdf.model.RDFNode> focusNodes)Validates a collection of focus nodes against a constraint.protected abstract StringgetLabel(Constraint constraint)protected org.apache.jena.query.QuerygetQuery()protected abstract StringgetSPARQL(Constraint constraint)protected abstract org.apache.jena.rdf.model.ResourcegetSPARQLExecutable(Constraint constraint)
-
-
-
Constructor Detail
-
AbstractSPARQLExecutor
protected AbstractSPARQLExecutor(Constraint constraint)
-
-
Method Detail
-
executeConstraint
public void executeConstraint(Constraint constraint, ValidationEngine engine, Collection<org.apache.jena.rdf.model.RDFNode> focusNodes)
Description copied from interface:ConstraintExecutorValidates a collection of focus nodes against a constraint. Implementations are typically calling engine.createValidationResult() to record results such as violations.- Specified by:
executeConstraintin interfaceConstraintExecutor- Parameters:
constraint- the Constraint (instance) to validate (e.g. a specific sh:datatype constraint)engine- the ValidationEnginefocusNodes- the collection of focus nodes - should not contain duplicates
-
addBindings
protected abstract void addBindings(Constraint constraint, org.apache.jena.query.QuerySolutionMap bindings)
-
getSPARQLExecutable
protected abstract org.apache.jena.rdf.model.Resource getSPARQLExecutable(Constraint constraint)
-
getLabel
protected abstract String getLabel(Constraint constraint)
-
getQuery
protected org.apache.jena.query.Query getQuery()
-
getSPARQL
protected abstract String getSPARQL(Constraint constraint)
-
addDetails
public static void addDetails(org.apache.jena.rdf.model.Resource parentResult, org.apache.jena.rdf.model.Model nestedResults)
-
-