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 2019/09/02 17:00:00 UTC

[jira] [Commented] (JENA-1751) Enable inline use of ElementTriplesBlock

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

Andy Seaborne commented on JENA-1751:
-------------------------------------

Just so we're clear here - {{ElementPathBlock}} is the unit used by SPARQL 1.1 parsing. 
{{ElementTriplesBlock}} (SPARQL 1.0) intentionally throws an exception if given a path.

Does module {{jena-querybuilder}} meet your needs?

Also - general point - if programmatically generating a query, you may wish to generate SPARQL algebra and not SPARQL syntax. Sometimes, it's easier.

Anyway please do send a pull request. 

The only issue I see is that changing a method signature to add a return is binary-incompatible even if it is source-compatible.


 

 

 

> Enable inline use of ElementTriplesBlock
> ----------------------------------------
>
>                 Key: JENA-1751
>                 URL: https://issues.apache.org/jira/browse/JENA-1751
>             Project: Apache Jena
>          Issue Type: Improvement
>            Reporter: Jan Martin Keil
>            Priority: Major
>
> To enable the inline use of {{org.apache.jena.sparql.syntax.ElementTriplesBlock}} during query generation, I propose to:
>  * add constructor {{public ElementTriplesBlock(Triple triple)}}
>  * add constructor {{public ElementTriplesBlock(Node s, Node p, Node o)}}
>  * add {{return this}} to
>  ** {{addTriple(Triple t)}}
>  ** {{addTriple(int index, Triple t)}}
>  ** {{addTriplePath(TriplePath path)}}
>  ** {{addTriplePath(int index, TriplePath path)}}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)