Package org.eclipse.rdf4j.sail.shacl.ast
Class Shape
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.ast.Shape
-
- All Implemented Interfaces:
ConstraintComponent
,Exportable
,Identifiable
,TargetChainInterface
- Direct Known Subclasses:
NodeShape
,PropertyShape
public abstract class Shape extends java.lang.Object implements ConstraintComponent, Identifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Shape.Factory
static class
Shape.ParseSettings
-
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.util.List<ConstraintComponent>
constraintComponents
(package private) Resource[]
contexts
(package private) boolean
deactivated
private Resource
id
private static org.slf4j.Logger
logger
(package private) java.util.List<Literal>
message
protected boolean
produceValidationReports
(package private) Severity
severity
(package private) java.util.List<Target>
target
(package private) TargetChain
targetChain
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.sail.shacl.ast.constraintcomponents.ConstraintComponent
deepClone, generateSparqlValidationQuery, generateTransactionalValidationPlan, getAllTargetsPlan, getPreferredValidationApproach
-
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
produceValidationReports
protected boolean produceValidationReports
-
id
private Resource id
-
targetChain
TargetChain targetChain
-
target
java.util.List<Target> target
-
deactivated
boolean deactivated
-
message
java.util.List<Literal> message
-
severity
Severity severity
-
constraintComponents
java.util.List<ConstraintComponent> constraintComponents
-
contexts
Resource[] contexts
-
-
Constructor Detail
-
Shape
public Shape()
-
Shape
public Shape(Shape shape)
-
-
Method Detail
-
populate
public void populate(ShaclProperties properties, ShapeSource shapeSource, Shape.ParseSettings parseSettings, Cache cache)
-
getId
public Resource getId()
- Specified by:
getId
in interfaceIdentifiable
-
getContexts
public Resource[] getContexts()
-
shallowClone
protected abstract Shape shallowClone()
-
toModel
public Model toModel(Model model)
- Parameters:
model
- the model to export the shapes into- Returns:
- the provided model
-
toModel
public void toModel(Resource subject, IRI predicate, Model model, java.util.Set<Resource> cycleDetection)
- Specified by:
toModel
in interfaceExportable
-
getConstraintComponents
java.util.List<ConstraintComponent> getConstraintComponents(ShaclProperties properties, ShapeSource shapeSource, Shape.ParseSettings parseSettings, Cache cache)
-
getTargetChain
public TargetChain getTargetChain()
- Specified by:
getTargetChain
in interfaceTargetChainInterface
-
setTargetChain
public void setTargetChain(TargetChain targetChain)
- Specified by:
setTargetChain
in interfaceTargetChainInterface
-
generatePlans
public PlanNode generatePlans(ConnectionsGroup connectionsGroup, ValidationSettings validationSettings)
-
getConstraintComponent
public SourceConstraintComponent getConstraintComponent()
- Specified by:
getConstraintComponent
in interfaceConstraintComponent
-
getSeverity
public Severity getSeverity()
-
isDeactivated
public boolean isDeactivated()
-
requiresEvaluation
public boolean requiresEvaluation(ConnectionsGroup connectionsGroup, ConstraintComponent.Scope scope, Resource[] dataGraph, StatementMatcher.StableRandomVariableProvider stableRandomVariableProvider)
- Specified by:
requiresEvaluation
in interfaceConstraintComponent
- Returns:
- true if the constraint component should be evaluated, eg. if validation is needed.
-
buildSparqlValidNodes_rsx_targetShape
public SparqlFragment buildSparqlValidNodes_rsx_targetShape(StatementMatcher.Variable<Value> subject, StatementMatcher.Variable<Value> object, RdfsSubClassOfReasoner rdfsSubClassOfReasoner, ConstraintComponent.Scope scope, StatementMatcher.StableRandomVariableProvider stableRandomVariableProvider)
For rsx:targetShape- Specified by:
buildSparqlValidNodes_rsx_targetShape
in interfaceConstraintComponent
-
getOptimalBulkValidationApproach
public ValidationApproach getOptimalBulkValidationApproach()
Description copied from interface:ConstraintComponent
Should return the fastest validation approach for bulk validation. When aggregating multiple constraint components the most compatible should be chosen.- Specified by:
getOptimalBulkValidationApproach
in interfaceConstraintComponent
-
getMessage
public final java.util.List<Literal> getMessage()
-
getDefaultMessage
public java.util.List<Literal> getDefaultMessage()
- Specified by:
getDefaultMessage
in interfaceConstraintComponent
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-