Class PatternConstraintComponent
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.AbstractConstraintComponent
-
- org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.SimpleAbstractConstraintComponent
-
- org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.PatternConstraintComponent
-
- All Implemented Interfaces:
ConstraintComponent
,Exportable
,TargetChainInterface
public class PatternConstraintComponent extends SimpleAbstractConstraintComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.ConstraintComponent
ConstraintComponent.Scope
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
flags
(package private) java.lang.String
pattern
-
Fields inherited from class org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.SimpleAbstractConstraintComponent
targetChain
-
Fields inherited from class org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.AbstractConstraintComponent
VALUES_INJECTION_POINT
-
-
Constructor Summary
Constructors Constructor Description PatternConstraintComponent(java.lang.String pattern, java.lang.String flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintComponent
deepClone()
boolean
equals(java.lang.Object o)
private static java.lang.String
escapeRegexForSparql(java.lang.String pattern)
SourceConstraintComponent
getConstraintComponent()
java.util.List<Literal>
getDefaultMessage()
(package private) java.util.function.Function<PlanNode,FilterPlanNode>
getFilterAttacher()
(package private) java.lang.String
getSparqlFilterExpression(StatementMatcher.Variable<Value> variable, boolean negated)
Simple constraints need only implement this method to support SPARQL based validation.int
hashCode()
void
toModel(Resource subject, IRI predicate, Model model, java.util.Set<Resource> cycleDetection)
-
Methods inherited from class org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.SimpleAbstractConstraintComponent
generateSparqlValidationQuery, generateTransactionalValidationPlan, getAllTargetsPlan, getId, getOptimalBulkValidationApproach, getPreferredValidationApproach, getTargetChain, literalToString, setTargetChain
-
Methods inherited from class org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.AbstractConstraintComponent
buildSparqlValidNodes_rsx_targetShape, requiresEvaluation, stringRepresentationOfValue, trim
-
-
-
-
Method Detail
-
toModel
public void toModel(Resource subject, IRI predicate, Model model, java.util.Set<Resource> cycleDetection)
-
getSparqlFilterExpression
java.lang.String getSparqlFilterExpression(StatementMatcher.Variable<Value> variable, boolean negated)
Description copied from class:SimpleAbstractConstraintComponent
Simple constraints need only implement this method to support SPARQL based validation. The returned filter body should evaluate to true for values that fail validation, unless negated==true. If the filter condition throws an error (a SPARQL runtime error, not Java error) then the error will be caught and coalesced to `true`.- Specified by:
getSparqlFilterExpression
in classSimpleAbstractConstraintComponent
- Returns:
- a string that is the body of a SPARQL filter
-
escapeRegexForSparql
private static java.lang.String escapeRegexForSparql(java.lang.String pattern)
-
getConstraintComponent
public SourceConstraintComponent getConstraintComponent()
- Specified by:
getConstraintComponent
in interfaceConstraintComponent
- Overrides:
getConstraintComponent
in classSimpleAbstractConstraintComponent
-
deepClone
public ConstraintComponent deepClone()
-
getFilterAttacher
java.util.function.Function<PlanNode,FilterPlanNode> getFilterAttacher()
- Specified by:
getFilterAttacher
in classSimpleAbstractConstraintComponent
-
getDefaultMessage
public java.util.List<Literal> getDefaultMessage()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-