sparna-git / shacl-play

SHACL validation UI, SHACL documentation generator, SHACL generator from RDF.
http://shacl-play.sparna.fr
GNU Lesser General Public License v3.0
24 stars 15 forks source link

JSON-LD @context generator : when there is an inverse property in the SHACL, generate a mapping with "inverse_xxxx" + @reverse #151

Open tfrancart opened 3 weeks ago

tfrancart commented 3 weeks ago

Exemple avec ce SHACL : https://europarl.github.io/eli-ep/dsd/adopted-texts/eli-ep_adopted-texts.shacl.ttl (visible at https://europarl.github.io/eli-ep/dsd/adopted-texts/)

image

ta:P27 owl:versionInfo "1.0";
  sh:path _:a4aeb3f30c2042e3b539bc99a24f35721159;
  sh:name "inverse corrects"@en;
  sh:nodeKind sh:IRI;
  sh:node ta:Corrigendum;
  shacl-play:shortname "inverse_corrects" .

_:a4aeb3f30c2042e3b539bc99a24f35721159 sh:inversePath eli:corrects .

alors on doit générer

"inverse_corrects": {
  "@reverse" : "eli:corrects",
  "@type" : "@id"
}
tfrancart commented 3 weeks ago

Note : ici il y a un "shacl-play:shortname", mais on devrait de toutes façon générer une clé spéciale avec "inverse_" et le nom de la clé normale.