[
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)