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

Round tripping property paths from SPARQL into Sexpressions and back yields a syntax error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 3.0.0
    • Jena 3.0.0
    • ARQ
    • None

    Description

      The following SPARQL query:

      SELECT ?uri WHERE {
        ?uri <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>+ <http://purl.org/linked-data/sdmx/2009/dimension#refArea>
      }
      

      When converted into an sse:

      (path
        ?uri
        (path+ <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>)
        <http://purl.org/linked-data/sdmx/2009/dimension#refArea>)
      

      and converted back into a SPARQL query via OpAsQuery is syntactically invalid. Note the misplaced `.`:

      SELECT  *
      WHERE
        {  .
          ?uri (<http://www.w3.org/2000/01/rdf-schema#subPropertyOf>)+ <http://purl.org/linked-data/sdmx/2009/dimension#refArea>
        }
      

      The same seems to occur for all other property paths (e.g. those that use +, *, /, ^ etc...)

      This seems related to issues resolved in JENA-963.

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              RickM Rick Moynihan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: