Classes:
-
ConstraintViolation–Exception for domain-specific constraint violation
-
SHACLViolation–Specialized exception for SHACL violations
Functions:
-
check_shacl_constraints–Check a graph against a collection of SHACL constraints
ConstraintViolation
ConstraintViolation(domain, message)
SHACLViolation
SHACLViolation(violation_str)
Bases: ConstraintViolation
Specialized exception for SHACL violations
Source code in src/rdf_utils/constraints.py
21 22 | |
check_shacl_constraints
check_shacl_constraints(graph, shacl_dict, quiet=False)
Check a graph against a collection of SHACL constraints
Parameters:
-
graph(Graph) –rdflib.Graph to be checked
-
shacl_dict(dict[str, str]) –mapping from SHACL path to graph format, e.g. URL -> "turtle"
-
quiet(bool, default:False) –if true will not throw an exception
Source code in src/rdf_utils/constraints.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |