ShEx ====== Example Output -------------- `personinfo.shex `_ Overview -------- `ShEx `__, short for Shape Expressions Language is a modeling language for RDF files. This generator can be used to create ShEx shapefiles, which can then be used to validate RDF data. ShEx provides similar functionality to SHACL, which has its own validator To run: .. code:: bash gen-shex personinfo.yaml > personinfo.shex Translation ^^^^^^^^^^^ An example of translating the personinfo schema is shown below. .. code-block:: shex ( CLOSED { ( $ ( schema:name @linkml:String ? ; schema:description @linkml:String ? ; schema:image @linkml:String ? ) ; rdf:type [ ] ) } OR @ OR @ OR @ ) CLOSED { ( $ ( & ; rdf:type [ ] ? ; & ; rdf:type [ ] ? ; @linkml:String ? ; schema:birthDate @linkml:String ? ; @linkml:Integer ? ; schema:gender @ ? ; @
? ; @ * ; @ * ; @ * ; @linkml:String * ) ; rdf:type [ schema:Person ] ) } Docs ---- Command Line ^^^^^^^^^^^^ .. currentmodule:: linkml.generators.shexgen .. click:: linkml.generators.shexgen:cli :prog: gen-shex :nested: short Code ^^^^ .. autoclass:: ShExGenerator :members: serialize