Andy,
I started to work on a solution which was fairly simple until I started to
run the test. I tried creating a query with the same optional block.
However, while they both looked like:
{noformat}
OPTIONAL
{ ?s <urn:q> "123"^^<http://www.w3.org/2001/XMLSchema#int> ;
<urn:v> ?x
FILTER ( ?x > 56 )
}
{noformat}
the one built by querybuilder is using an ElementTriplesBlock for the:
{noformat}
?s <urn:q> "123"^^<http://www.w3.org/2001/XMLSchema#int> ;
<urn:v> ?x
{noformat}
while the queryFactory version uses an ElementPathBlock.
I suspect this is as defect in the querybuilder but can you explain the
difference and when one or the other should be used?
Claude
On Sun, Sep 20, 2015 at 10:19 AM, Claude Warren <[email protected]> wrote:
> No there isn't. It is an oversight. Looks like QueryBuilder needs to
> have a group pattern. I think that this could be done by using a
> SelectBuilder as a container the group pattern as we can get a WhereHandler
> from it and that seems to have all the bits that are needed.
>
> Claude
>
> On Sat, Sep 19, 2015 at 3:10 PM, Andy Seaborne <[email protected]> wrote:
>
>> how do I add
>>
>> OPTIONAL {
>> ?s <q> 123 .
>> ?s <v> ?x .
>> FILTER(?x>56)
>> }
>>
>> i.e a compound OPTIONAL pattern?
>>
>> There seems to be no concept of a group pattern (do not confuse with
>> GROUP BY).
>>
>> (This applies all places group patterns occur, which is quite a few in
>> SPARQL)
>>
>> Andy
>>
>
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren