You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2015/07/14 10:37:04 UTC
[jira] [Comment Edited] (JENA-989) Round tripping property paths
from SPARQL into Sexpressions and back yields a syntax error
[ https://issues.apache.org/jira/browse/JENA-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626025#comment-14626025 ]
Andy Seaborne edited comment on JENA-989 at 7/14/15 8:36 AM:
-------------------------------------------------------------
This is a problem caused by JENA-972 (Improve the printing of basic graph patterns) but OpAsQuery tends to create queries that are likely to trigger this.
OpAsQuery tends to create group elements (between {{\{...\}}}) with adjacent {{ElementPathBlocks}} - blocks for any basic graph pattern and blocks for each path. {{ElementPathBlocks}} can hold both and the parser will not produce adjacent blocks, but instead a single combined block. Both wend up as the same algebra.
JENA-972 improved the prettiness of output but has a bug whereby "no triple patterns before the path" causes the stray {{.}}. OpAsQuery is not necessary to cause this though JENA-963 makes the situation more common.
was (Author: andy.seaborne):
This is a problem caused by JENA-972 (Improve the printing of basic graph patterns) but OpAsQuery tends to create queries that are likely to trigger this.
OpAsQuery tends to create group elements (between {{\{...\}}}) with adjacent {{ElementPathBlocks}} - blocks for any basic graph pattern and blocks for each path. {{ElementPathBlocks}} can hold both and the parser will not produce adjacent blocks, but instead a single combined block. Both wend up as the same algebra.
JENA-972 improved the prettiness of output but has a bug whereby "no triple patterns before the path" causes the stray {{.}}. OpAsQuery is not necessary. to cause this.
> Round tripping property paths from SPARQL into Sexpressions and back yields a syntax error
> ------------------------------------------------------------------------------------------
>
> Key: JENA-989
> URL: https://issues.apache.org/jira/browse/JENA-989
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.0.0
> Reporter: Rick Moynihan
>
> The following SPARQL query:
> {noformat}
> SELECT ?uri WHERE {
> ?uri <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>+ <http://purl.org/linked-data/sdmx/2009/dimension#refArea>
> }
> {noformat}
> When converted into an sse:
> {noformat}
> (path
> ?uri
> (path+ <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>)
> <http://purl.org/linked-data/sdmx/2009/dimension#refArea>)
> {noformat}
> and converted back into a SPARQL query via OpAsQuery is syntactically invalid. Note the misplaced `.`:
> {noformat}
> SELECT *
> WHERE
> { .
> ?uri (<http://www.w3.org/2000/01/rdf-schema#subPropertyOf>)+ <http://purl.org/linked-data/sdmx/2009/dimension#refArea>
> }
> {noformat}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)