o-development / ldo

Monorepo for Linked Data Objects (ldo)
MIT License
22 stars 5 forks source link

Support for SHACL #25

Open thhck opened 3 months ago

thhck commented 3 months ago

Hello, Would it be one day possible to build ldo from SHACL shapes ? My main motivation it to be able to use this tool: https://github.com/ULB-Darmstadt/shacl-form allongside LDO .

jeswr commented 3 months ago

I would also like this feature. I've been using 2 workarounds that both work in a very limited set of cases:

  1. This script I threw together a couple of days ago https://gist.github.com/jeswr/65bead6723b1b4b66ff7bb1f02730e84 (it converts shacl compact syntax to shex, but you'll be able to work with SHACL serialised in turtle etc. by just changing out the parser).
  2. This docker image which makes use of shaclex to convert a subset of SHACL to SHEX https://hub.docker.com/r/jeswr/shacl2shex

I'll ping here again when I opensource the codebase that makes use of this.

jeswr commented 2 months ago

FWIW the script I threw together is now available as a package https://github.com/jeswr/shacl2shex and allows any shacl serialisation (including .ttl and .shaclc) to be dereferenced to shexj more-or-less out of the box per https://github.com/jeswr/shacl2shex/blob/8a077c277ddbd322a94d7bc88c712f64ee6a94fe/lib/bin/index.ts#L9-L10 so it should be fairly straightforward to use that code to add SHACL support straight into LDO.

cc @labra