You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Natanael Arndt (JIRA)" <ji...@apache.org> on 2014/03/18 16:44:44 UTC

[jira] [Comment Edited] (JENA-655) SPARQL query fails if answer contains extra content

    [ https://issues.apache.org/jira/browse/JENA-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13939133#comment-13939133 ] 

Natanael Arndt edited comment on JENA-655 at 3/18/14 3:43 PM:
--------------------------------------------------------------

What is the reason for {{checkContains(something, true, …)}} in {{com.hp.hpl.jena.sparql.resultset.JSONInput}}? It would be the same as just not calling this method, since the only reason seams to be to throw an Exception if there are {{undefinedKeys}}.


was (Author: white_gecko):
What is the reason for `checkContains(something, true, …)` in com.hp.hpl.jena.sparql.resultset.JSONInput? It would be the same as just not calling this method, since the only reason seams to be to throw an Exception if there are undefinedKeys.

> SPARQL query fails if answer contains extra content
> ---------------------------------------------------
>
>                 Key: JENA-655
>                 URL: https://issues.apache.org/jira/browse/JENA-655
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>    Affects Versions: Jena 2.11.1
>            Reporter: Natanael Arndt
>            Assignee: Rob Vesse
>         Attachments: 0001-Fix-JENA-655.-Remove-the-header-fields-check-for-JSO.patch
>
>
> When sending a query to a service which doesn't only reply the fields "head" and "results", but also some extra field the query execution will throw an Exception.
> An example is the myexperiment service [1] when you send this query "select ?s {?s ?p ?o} limit 1" and an "application/sparql-results+json" Accept-Header you will get something like that:
> {noformat}
>     {"head":{"vars":["s"]},
>      "results": {
>       "bindings":[
>        {"s":{"type":"uri","value":"http://rdf.myexperiment.org/ontologies/snarm/Policy"}}
>       ]
>      },
>      "warnings": ["parser warning: Variable o was bound but is unused in the query on line 1",
>     "parser warning: Variable p was bound but is unused in the query on line 1"]
>     }
> {noformat}
> It also contains the not standard field "warnings", which makes jena to throw an exception. I don't see any necessity for this behavior.
> [1] http://rdf.myexperiment.org/sparql/



--
This message was sent by Atlassian JIRA
(v6.2#6252)