Package org.eclipse.rdf4j.sail.shacl.ast
Class ValidationQuery
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.ast.ValidationQuery
-
- Direct Known Subclasses:
ValidationQuery.Deactivated
public class ValidationQuery extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValidationQuery.Deactivated
-
Field Summary
Fields Modifier and Type Field Description private ConstraintComponent
constraintComponent
private ConstraintComponent
constraintComponent_validationReport
private java.util.Set<Namespace>
namespaces
private boolean
propertyShapeWithValue
private boolean
propertyShapeWithValue_validationReport
private java.lang.String
query
private ConstraintComponent.Scope
scope
private ConstraintComponent.Scope
scope_validationReport
private Severity
severity
private Shape
shape
private int
targetIndex
private int
targetIndex_validationReport
private int
valueIndex
private int
valueIndex_validationReport
private java.util.List<StatementMatcher.Variable<Value>>
variables
-
Constructor Summary
Constructors Constructor Description ValidationQuery(java.util.Collection<Namespace> namespaces, java.lang.String query, java.util.List<StatementMatcher.Variable<Value>> targets, StatementMatcher.Variable<Value> value, ConstraintComponent.Scope scope, ConstraintComponent constraintComponent, Severity severity, Shape shape)
ValidationQuery(java.util.Set<Namespace> namespaces, java.lang.String query, ConstraintComponent.Scope scope, java.util.List<StatementMatcher.Variable<Value>> variables, int targetIndex, int valueIndex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getFullQueryString()
java.lang.String
getQuery()
private java.lang.String
getTargetVariable(boolean forValidationReport)
PlanNode
getValidationPlan(SailConnection baseConnection, Resource[] dataGraph, Resource[] shapesGraphs)
private java.lang.String
getValueVariable(boolean forValidationReport)
void
makeCurrentStateValidationReport()
void
popTargetChain()
void
shiftToNodeShape()
void
shiftToPropertyShape()
static ValidationQuery
union(ValidationQuery a, ValidationQuery b, boolean skipValueCheck)
Creates the SPARQL UNION of two ValidationQuery objects.ValidationQuery
withConstraintComponent(ConstraintComponent constraintComponent)
ValidationQuery
withSeverity(Severity severity)
ValidationQuery
withShape(Shape shape)
-
-
-
Field Detail
-
namespaces
private final java.util.Set<Namespace> namespaces
-
query
private java.lang.String query
-
scope
private ConstraintComponent.Scope scope
-
scope_validationReport
private ConstraintComponent.Scope scope_validationReport
-
variables
private final java.util.List<StatementMatcher.Variable<Value>> variables
-
targetIndex
private int targetIndex
-
valueIndex
private int valueIndex
-
propertyShapeWithValue
private boolean propertyShapeWithValue
-
propertyShapeWithValue_validationReport
private boolean propertyShapeWithValue_validationReport
-
targetIndex_validationReport
private int targetIndex_validationReport
-
valueIndex_validationReport
private int valueIndex_validationReport
-
constraintComponent
private ConstraintComponent constraintComponent
-
constraintComponent_validationReport
private ConstraintComponent constraintComponent_validationReport
-
severity
private Severity severity
-
shape
private Shape shape
-
-
Constructor Detail
-
ValidationQuery
public ValidationQuery(java.util.Collection<Namespace> namespaces, java.lang.String query, java.util.List<StatementMatcher.Variable<Value>> targets, StatementMatcher.Variable<Value> value, ConstraintComponent.Scope scope, ConstraintComponent constraintComponent, Severity severity, Shape shape)
-
ValidationQuery
public ValidationQuery(java.util.Set<Namespace> namespaces, java.lang.String query, ConstraintComponent.Scope scope, java.util.List<StatementMatcher.Variable<Value>> variables, int targetIndex, int valueIndex)
-
-
Method Detail
-
union
public static ValidationQuery union(ValidationQuery a, ValidationQuery b, boolean skipValueCheck)
Creates the SPARQL UNION of two ValidationQuery objects.- Parameters:
a
- The first ValidationQuery.b
- The second ValidationQuery.skipValueCheck
- Skips checks that the two ValidationQuery object are using the same value. This is useful if the ValidationQuery is guaranteed to not use the current value becauseshiftToNodeShape()
orpopTargetChain()
will always called on the returned ValidationQuery- Returns:
-
getQuery
public java.lang.String getQuery()
-
getValidationPlan
public PlanNode getValidationPlan(SailConnection baseConnection, Resource[] dataGraph, Resource[] shapesGraphs)
-
getFullQueryString
private java.lang.String getFullQueryString()
-
getValueVariable
private java.lang.String getValueVariable(boolean forValidationReport)
-
getTargetVariable
private java.lang.String getTargetVariable(boolean forValidationReport)
-
withSeverity
public ValidationQuery withSeverity(Severity severity)
-
withShape
public ValidationQuery withShape(Shape shape)
-
popTargetChain
public void popTargetChain()
-
shiftToNodeShape
public void shiftToNodeShape()
-
shiftToPropertyShape
public void shiftToPropertyShape()
-
withConstraintComponent
public ValidationQuery withConstraintComponent(ConstraintComponent constraintComponent)
-
makeCurrentStateValidationReport
public void makeCurrentStateValidationReport()
-
-