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/03 11:39:00 UTC

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

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

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

{{ElementPathBlock(Triple... triples)}} is done with {{ElementPathBlock(BasicPattern)}} and there is {{BasicPattern.wrap()}}.

It is possible to design your own builder or have some library code to make these appear in a form you want.

It is being to sound like a builder pattern which is jena-querybuilder is providing. Now it might be there are style differences leading to some impedance which would be useful to discuss and address. Turning each "add" may or may not be the way to do.

cc [~claudenw]



> Enable inline use of Element Subclasses
> ---------------------------------------
>
>                 Key: JENA-1751
>                 URL: https://issues.apache.org/jira/browse/JENA-1751
>             Project: Apache Jena
>          Issue Type: Improvement
>            Reporter: Jan Martin Keil
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)