Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2145

shaclc serialization of datatypes should be shorter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      https://github.com/euBusinessGraph/eubg-data/blob/master/model/ebg-shapes.shaclc includes the following:

        skos:altLabel            xsd:string|rdf:langString !pattern="^ | $| {2}" [0..*] .
      

      This is output more verbosely as:

          skos:altLabel ! pattern="^ | $| {2}" datatype=xsd:string | datatype=rdf:langString .
      

      The shorter notation is allowed according to https://w3c.github.io/shacl/shacl-compact-syntax/#rule-propertyType:
      "propertyType: If ?iri is one of the RDF datatypes supported by SPARQL 1.1 (such as xsd:string) then produce a triple ?property sh:datatype ?iri, otherwise ?property sh:class ?iri."

      Jena already checks whether the IRI is a known datatype and otherwise outputs "class=". So it should be a simple matter to implement the shorter notation.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vladimir.alexiev Vladimir Alexiev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: