ShEx: Annotations & Documentation
We think about the possibilities to automatically generate Documentation of the data model out of the shape expressions.
A template for such a documentation would look like this*: https://sharepoint.tu-dresden.de/projects/nfdi4earth/_layouts/15/WopiFrame2.aspx?sourcedoc=%7BE75C4B1D-5C6A-40CC-B0F2-DAEC04C3C038%7D&file=N4E_DCAT_AP_draft.docx&action=default&IsList=1&ListId=%7B3A922912-72B6-4D1E-AF3F-91E207CF0B56%7D&ListItemId=24
* only internal available
What is currently missing, is the description of each "property" (so called in the template) which corresponds to a "triple constraint" in ShEx.
Is is basically possible to add annotations: http://book.validatingrdf.com/bookHtml013.html#sec212
And @jgrieb already checked out, how to request them via PyShEx:
from pyshex.utils.schema_loader import SchemaLoader
schema = SchemaLoader().loads(get_shex())
# dann haben wir das gesamte Shex schema als Python object, man muss sich ein bisschen durch die Syntax durch graben, aber auch annotations werden darin mit aufgenommmen!. z.B:
schema.shapes[1].expression.expressions[0].annotations