pySHACL Features Matrix
August 19, 2021 · View on GitHub
Core Constraint Components
Value Type Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:class | ClassConstraintComponent | ▶ | ||
sh:datatype | DatatypeConstraintComponent | ▶ | ||
sh:nodeKind | NodeKindConstraintComponent | ▶ |
Cardinality Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:minCount | MinCountConstraintComponent | ▶ | ||
sh:maxCount | MaxCountConstraintComponent | ▶ |
Value Range Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:minExclusive | MinExclusiveConstraintComponent | ▶ | ||
sh:minInclusive | MinInclusiveConstraintComponent | ▶ | ||
sh:maxExclusive | MaxExclusiveConstraintComponent | ▶ | ||
sh:maxInclusive | MaxInclusiveConstraintComponent | ▶ |
String-based Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:minLength | MinLengthConstraintComponent | ▶ | ||
sh:maxLength | MaxLengthConstraintComponent | ▶ | ||
sh:pattern | PatternConstraintComponent | ▶ | includes sh:flags | |
sh:languageIn | LanguageInConstraintComponent | ▶ | ||
sh:uniqueLang | UniqueLangConstraintComponent | ▶ |
Property Pair Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:equals | EqualsConstraintComponent | ▶ | ||
sh:disjoint | DisjointConstraintComponent | ▶ | ||
sh:lessThan | LessThanConstraintComponent | ▶ | ||
sh:lessThanOrEquals | LessThanOrEqualsConstraintComponent | ▶ |
Logical Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:not | NotConstraintComponent | ▶ | ||
sh:and | AndConstraintComponent | ▶ | ||
sh:or | OrConstraintComponent | ▶ | ||
sh:xone | XoneConstraintComponent | ▶ |
Shape-based Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:node | NodeConstraintComponent | ▶ | ||
sh:property | PropertyConstraintComponent | ▶ | See SHACL Property Paths feature table below | |
sh:qualifiedValueShape | QualifiedValueShapeConstraintComponent | ▶ | includes sh:qualifiedValueShapesDisjoint | |
sh:qualifiedMinCount | QualifiedMinCountConstraintComponent | ▶ | ||
sh:qualifiedMaxCount | QualifiedMaxCountConstraintComponent | ▶ |
Other Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:closed | ClosedConstraintComponent | ▶ | ||
sh:ignoredProperties | ClosedConstraintComponent | ▶ | ||
sh:hasValue | HasValueConstraintComponent | ▶ | ||
sh:in | InConstraintComponent | ▶ |
SPARQL Constraints
SPARQL Based Constraints
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:sparql | SPARQLConstraintComponent | ▶ |
SPARQL Based Constraint Components
| Parameter | Constraint | Link | Status | Comments |
|---|---|---|---|---|
sh:validator | ConstraintComponent | ▶ | ||
sh:select | SPARQLSelectValidator | ▶ | ||
sh:ask | SPARQLAskValidator | ▶ |
SHACL Property Paths
| Path | Link | Status | Comments |
|---|---|---|---|
| Predicate Path | ▶ | ||
| Sequence Paths | ▶ | ||
| Alternative Paths | ▶ | ||
| Inverse Paths | ▶ | ||
| Zero-Or-More Paths | ▶ | ||
| One-Or-More Paths | ▶ | ||
| Zero-Or-One Paths | ▶ |
Non-Validating Shape Characteristics
| Path | Link | Status | Comments |
|---|---|---|---|
sh:name | ▶ | ||
sh:description | ▶ | ||
sh:order | ▶ | ||
sh:group | ▶ | ||
sh:defaultValue | ▶ |
SHACL Advanced Features spec
Custom Targets
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:target | ▶ | ||
sh:SPARQLTarget | ▶ | ||
sh:SPARQLTargetType | ▶ |
Annotation Properties
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:annotationProperty | ▶ | ||
sh:annotationVarName | ▶ | ||
sh:annotationValue | ▶ |
SHACL Functions
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:SHACLFunction | ▶ | fully implemented | |
sh:SPARQLFunction | ▶ | implemented using RDFLib |
Node Expressions
| Path | Link | Status | Comments |
|---|---|---|---|
sh:this | ▶ | ||
| Constant Term | ▶ | ||
sh:filterShape | ▶ | not tested | |
| SHACL Function | ▶ | ||
sh:path | ▶ | ||
sh:intersection | ▶ | not tested | |
sh:union | ▶ | not tested |
Expression Constraints
| Path | Link | Status | Comments |
|---|---|---|---|
sh:ExpressionConstraintComponent | ▶ |
SHACL Rules
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:condition | ▶ | ||
sh:order | ▶ | ||
sh:deactivated | ▶ | ||
sh:entailment | ▶ | ||
sh:TripleRule | ▶ | ||
sh:SPARQLRule | ▶ |
SHACL-JS spec
The SHACL-JS features are implemented behind a Python "extras" feature.
To enable it, you must install PySHACL using PIP with the extras included like pyshacl[js]
Javascript-based Constraints
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:js | ▶ |
Javascript-based Constraints-Components
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:validator | ▶ | ||
sh:JSValidator | ▶ |
Javascript-based SHACL Functions
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:JSFunction | ▶ | ||
sh:parameter | ▶ |
Javascript-based SHACL Rules
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:JSRule | ▶ |
Javascript-based Custom Targets
| Parameter | Link | Status | Comments |
|---|---|---|---|
sh:JSTarget | ▶ | ||
sh:JSTargetType | ▶ |
Implementation Notes
SHACL Test Suite Failures:
- core/property/datatype-ill-formed.ttl : Waiting on RDFLib support for determining ill-formed Literals https://github.com/RDFLib/rdflib/issues/848
- sparql/pre-binding/shapesGraph-001.ttl : Prebinding to $shapesGraph is currently unsupported. This will be supported in the future.