Générer un JSON-LD

This utility generates a JSON-LD context document from a SHACL specification. Detailed documentation is available below.

  Shapes

Annuler Sélectionner un fichier Modifier
Vous pouvez sélectionnez plusieurs fichiers d'un coup. Extensions supportées : .rdf, .ttl, .n3, .trig. Les autres extensions seront considérées comme du RDF/XML
URL d'un fichier RDF valide - supporte les mêmes extensions que l'upload ci-dessus.
Syntaxes supportées : Turtle, RDF/XML, JSON-LD, TriG, TriX, N-Quads. Privilégiez Turtle.

Documentation

JSON-LD context document generation algorithm

The algorithm follow these steps to generate the JSON-LD context:

  1. Always add a mapping from id, type and graph to @id, @type and @graph respectively.
  2. Add prefix mappings for each known prefixes in the SHACL file.
  3. Add mappings with the URI of NodeShapes in the SHACL, using the local part of the URI as JSON key.
  4. Add mappings with the URI of properties referred to in sh:path in the SHACL. SHACL property paths are not supported. By default, the local part of the property URI is used as key, but a different JSON key can be specified by annotating the property shape with the property https://shacl-play.sparna.fr/ontology#shortname (if the same property is referred to by multiple property shapes annotated with different shortname, the first one is used). Then :
    1. Determine the @type from datatypes : read the sh:datatype on property shapes referring to the property. If there is one, use it as the value of @type (if the same property is referred to by multiple property shapes with different sh:datatype, the first one is used.)
    2. Determine the @type from URI reference : if there are sh:class, sh:node, or if sh:nodeKind = sh:IRI or sh:BlankNodeOrIRI, set the @type to @id