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 classShape.Factorystatic classShape.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) booleandeactivatedprivate Resourceidprivate static org.slf4j.Loggerlogger(package private) java.util.List<Literal>messageprotected booleanproduceValidationReports(package private) Severityseverity(package private) java.util.List<Target>target(package private) TargetChaintargetChain
-
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:
getIdin 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:
toModelin interfaceExportable
-
getConstraintComponents
java.util.List<ConstraintComponent> getConstraintComponents(ShaclProperties properties, ShapeSource shapeSource, Shape.ParseSettings parseSettings, Cache cache)
-
getTargetChain
public TargetChain getTargetChain()
- Specified by:
getTargetChainin interfaceTargetChainInterface
-
setTargetChain
public void setTargetChain(TargetChain targetChain)
- Specified by:
setTargetChainin interfaceTargetChainInterface
-
generatePlans
public PlanNode generatePlans(ConnectionsGroup connectionsGroup, ValidationSettings validationSettings)
-
getConstraintComponent
public SourceConstraintComponent getConstraintComponent()
- Specified by:
getConstraintComponentin 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:
requiresEvaluationin 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_targetShapein interfaceConstraintComponent
-
getOptimalBulkValidationApproach
public ValidationApproach getOptimalBulkValidationApproach()
Description copied from interface:ConstraintComponentShould return the fastest validation approach for bulk validation. When aggregating multiple constraint components the most compatible should be chosen.- Specified by:
getOptimalBulkValidationApproachin interfaceConstraintComponent
-
getMessage
public final java.util.List<Literal> getMessage()
-
getDefaultMessage
public java.util.List<Literal> getDefaultMessage()
- Specified by:
getDefaultMessagein interfaceConstraintComponent
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-