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 classValidationQuery.Deactivated
-
Field Summary
Fields Modifier and Type Field Description private ConstraintComponentconstraintComponentprivate ConstraintComponentconstraintComponent_validationReportprivate java.util.Set<Namespace>namespacesprivate booleanpropertyShapeWithValueprivate booleanpropertyShapeWithValue_validationReportprivate java.lang.Stringqueryprivate ConstraintComponent.Scopescopeprivate ConstraintComponent.Scopescope_validationReportprivate Severityseverityprivate Shapeshapeprivate inttargetIndexprivate inttargetIndex_validationReportprivate intvalueIndexprivate intvalueIndex_validationReportprivate 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.StringgetFullQueryString()java.lang.StringgetQuery()private java.lang.StringgetTargetVariable(boolean forValidationReport)PlanNodegetValidationPlan(SailConnection baseConnection, Resource[] dataGraph, Resource[] shapesGraphs)private java.lang.StringgetValueVariable(boolean forValidationReport)voidmakeCurrentStateValidationReport()voidpopTargetChain()voidshiftToNodeShape()voidshiftToPropertyShape()static ValidationQueryunion(ValidationQuery a, ValidationQuery b, boolean skipValueCheck)Creates the SPARQL UNION of two ValidationQuery objects.ValidationQuerywithConstraintComponent(ConstraintComponent constraintComponent)ValidationQuerywithSeverity(Severity severity)ValidationQuerywithShape(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()
-
-