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 2020/03/13 20:57:00 UTC
[jira] [Commented] (JENA-1863) Query builder creates query with
wrong padding when rdf:type is present
[ https://issues.apache.org/jira/browse/JENA-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17059070#comment-17059070 ]
Andy Seaborne commented on JENA-1863:
-------------------------------------
Simpler test case:
{noformat}
qparse 'SELECT * { ?subject a ?object}'}
{noformat}
It is the same indentation as when {{rdf:type}} is used.
> Query builder creates query with wrong padding when rdf:type is present
> -----------------------------------------------------------------------
>
> Key: JENA-1863
> URL: https://issues.apache.org/jira/browse/JENA-1863
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.14.0
> Reporter: David Ruszkai
> Priority: Trivial
>
> Creating a query with any QueryBuilder (SelectBuilder, AskBuilder etc.) when an RDF.type predicate is present will result in a query that contains the character 'a' followed by 19 spaces instead of a single 'a' (shortcut to the RDF.type predicate) or "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>" (the URI of the RDF.type predicate).
> Example:
> {code:java}
> new SelectBuilder().addWhere(createVariable("subject"), org.apache.jena.vocabulary.RDF.type, createVariable("object")).buildString()
> {code}
> OR
> {code:java}
> new SelectBuilder().addWhere(createVariable("subject"), createURI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), createVariable("object")).buildString()
> {code}
> will create the following query
> {code:java}
> SELECT *
> WHERE
> { ?subject a ?object}
> {code}
> Probably caused by:
> [https://github.com/apache/jena/commit/6570c25be8c6e958a5647a7d2c1e23466498b332]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)