SHACL ====== .. warning:: Beta implementation, some features may change Example Output -------------- `personinfo.shacl.ttl `_ Overview -------- `SHACL `__ (Shapes Constraint Language) is a language for validating RDF graphs against a set of conditions To run: .. code:: bash gen-shacl personinfo.yaml > personinfo.shacl.ttl Docs ---- Example Input: .. code-block:: yaml NamedThing: slots: - id - name HasAliases: mixin: true attributes: aliases: multivalued: true Person: is_a: NamedThing mixins: - HasAliases slots: - birth_date - age_in_years - gender Example Output: .. code-block:: turtle a shacl:NodeShape ; shacl:closed true ; shacl:ignoredProperties ( rdf:type ) ; shacl:property [ shacl:class ; shacl:maxCount 1 ; shacl:nodeKind shacl:BlankNode ; shacl:path ], [ shacl:maxCount 1 ; shacl:maxInclusive 999 ; shacl:minInclusive 0 ; shacl:path ], [ shacl:class ; shacl:nodeKind shacl:BlankNode ; shacl:path ], [ shacl:maxCount 1 ; shacl:path ; shacl:pattern "^\\S+ \\S+" ], [ shacl:class ; shacl:nodeKind shacl:BlankNode ; shacl:path ], [ shacl:class ; shacl:nodeKind shacl:BlankNode ; shacl:path ], [ shacl:maxCount 1 ; shacl:path ], [ shacl:path ], [ shacl:class ; shacl:nodeKind shacl:BlankNode ; shacl:path ] ; shacl:targetClass . Command Line ^^^^^^^^^^^^ .. currentmodule:: linkml.generators.shaclgen .. click:: linkml.generators.shaclgen:cli :prog: gen-shacl :nested: short Code ^^^^ .. autoclass:: ShaclGenerator :members: serialize