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 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 protected booleanproduceValidationReports
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SparqlFragmentbuildSparqlValidNodes_rsx_targetShape(StatementMatcher.Variable<org.eclipse.rdf4j.model.Value> subject, StatementMatcher.Variable<org.eclipse.rdf4j.model.Value> object, RdfsSubClassOfReasoner rdfsSubClassOfReasoner, ConstraintComponent.Scope scope, StatementMatcher.StableRandomVariableProvider stableRandomVariableProvider)For rsx:targetShapebooleanequals(Object o)PlanNodegeneratePlans(ConnectionsGroup connectionsGroup, ValidationSettings validationSettings)SourceConstraintComponentgetConstraintComponent()org.eclipse.rdf4j.model.Resource[]getContexts()List<org.eclipse.rdf4j.model.Literal>getDefaultMessage()org.eclipse.rdf4j.model.ResourcegetId()List<org.eclipse.rdf4j.model.Literal>getMessage()ValidationApproachgetOptimalBulkValidationApproach()Should return the fastest validation approach for bulk validation.SeveritygetSeverity()TargetChaingetTargetChain()inthashCode()booleanisDeactivated()voidpopulate(ShaclProperties properties, ShapeSource shapeSource, Shape.ParseSettings parseSettings, Cache cache)booleanrequiresEvaluation(ConnectionsGroup connectionsGroup, ConstraintComponent.Scope scope, org.eclipse.rdf4j.model.Resource[] dataGraph, StatementMatcher.StableRandomVariableProvider stableRandomVariableProvider)voidsetTargetChain(TargetChain targetChain)protected abstract ShapeshallowClone()org.eclipse.rdf4j.model.ModeltoModel(org.eclipse.rdf4j.model.Model model)voidtoModel(org.eclipse.rdf4j.model.Resource subject, org.eclipse.rdf4j.model.IRI predicate, org.eclipse.rdf4j.model.Model model, Set<org.eclipse.rdf4j.model.Resource> cycleDetection)StringtoString()-
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
-
-
-
-
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 org.eclipse.rdf4j.model.Resource getId()
- Specified by:
getIdin interfaceIdentifiable
-
getContexts
public org.eclipse.rdf4j.model.Resource[] getContexts()
-
shallowClone
protected abstract Shape shallowClone()
-
toModel
public org.eclipse.rdf4j.model.Model toModel(org.eclipse.rdf4j.model.Model model)
- Parameters:
model- the model to export the shapes into- Returns:
- the provided model
-
toModel
public void toModel(org.eclipse.rdf4j.model.Resource subject, org.eclipse.rdf4j.model.IRI predicate, org.eclipse.rdf4j.model.Model model, Set<org.eclipse.rdf4j.model.Resource> cycleDetection)- Specified by:
toModelin interfaceExportable
-
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, org.eclipse.rdf4j.model.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<org.eclipse.rdf4j.model.Value> subject, StatementMatcher.Variable<org.eclipse.rdf4j.model.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 List<org.eclipse.rdf4j.model.Literal> getMessage()
-
getDefaultMessage
public List<org.eclipse.rdf4j.model.Literal> getDefaultMessage()
- Specified by:
getDefaultMessagein interfaceConstraintComponent
-
-