Add SHACL path to RDFLib Path utility and corresponding tests by mgberg · Pull Request #2699 · RDFLib/rdflib (original) (raw)

Summary of changes

This adds a utility to parse valid SHACL Paths (e.g. the objects of triples with predicate sh:path) into an RDFLib-friendly object. The resulting object could either be:

This enables easy evaluation and manipulation of SHACL paths using RDFLib. For example:

Note that pyshacl does not have a utility to do this- rather, it only evaluates SHACL paths.

Checklist