You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Stephan Zednik <ze...@rpi.edu> on 2012/07/12 18:48:20 UTC
Does ARQ list:member work with TDB?
I am transitioning from in-memory models to TDB on a system and all my queries that leverage ARQ's list:member are no longer fully functioning.
specifically, list:member is not longer being asserted and as such members of lists are no longer being described.
My queries take the form:
DESCRIBE ?service ?operation
WHERE { ?service dcterms:identifier ?id .
OPTIONAL { ?service ex:operations [ list:member ?operation ] }
}
and are run using the following code:
protected Model _describe(JenaObject obj, String query, QuerySolutionMap params) {
dataset.begin(ReadWrite.READ);
try {
QueryExecution qExec = QueryExecutionFactory.create(query, dataset, params);
try {
Model m = qExec.execDescribe();
return m;
} finally {
qExec.close();
}
} finally {
dataset.end();
}
}
Thanks.
--Stephan
Re: Does ARQ list:member work with TDB?
Posted by Andy Seaborne <an...@apache.org>.
On 13/07/12 20:11, Stephan Zednik wrote:
> Thanks.
>
> I updated my TDB installation and my application's jena dependencies
> to jena-arq 2.9.2 and jena-tdb 0.9.2 from 2.9.0-incubating and
> 0.9.0-incubating and that seems to have resolved the issue.
That's my memory going - I remembered it used not to work in some
versions but I thought it was many versions ago!
Andy
Re: Does ARQ list:member work with TDB?
Posted by Stephan Zednik <lo...@gmail.com>.
Thanks.
I updated my TDB installation and my application's jena dependencies to jena-arq 2.9.2 and jena-tdb 0.9.2 from 2.9.0-incubating and 0.9.0-incubating and that seems to have resolved the issue.
--Stephan
On Jul 12, 2012, at 4:03 PM, Andy Seaborne wrote:
> On 12/07/12 17:48, Stephan Zednik wrote:
>> I am transitioning from in-memory models to TDB on a system and all my queries that leverage ARQ's list:member are no longer fully functioning.
>>
>> specifically, list:member is not longer being asserted and as such members of lists are no longer being described.
>>
>> My queries take the form:
>>
>> DESCRIBE ?service ?operation
>> WHERE { ?service dcterms:identifier ?id .
>> OPTIONAL { ?service ex:operations [ list:member ?operation ] }
>> }
>>
>> and are run using the following code:
>>
>> protected Model _describe(JenaObject obj, String query, QuerySolutionMap params) {
>> dataset.begin(ReadWrite.READ);
>> try {
>> QueryExecution qExec = QueryExecutionFactory.create(query, dataset, params);
>> try {
>> Model m = qExec.execDescribe();
>> return m;
>> } finally {
>> qExec.close();
>> }
>> } finally {
>> dataset.end();
>> }
>> }
>>
>> Thanks.
>> --Stephan
>>
>
>
> Works for me.
>
> Try this:
>
>
> ---- D.ttl
> @prefix : <http://example/> .
>
> :s :p ( 1 2 ) .
> ---- Q.rq
> PREFIX : <http://example/>
> PREFIX list: <http://jena.hpl.hp.com/ARQ/list#>
>
> SELECT * { :s :p [ list:member ?x ] }
>
>
> sparql --data D.ttl --query Q.rq
> ==>
> -----
> | x |
> =====
> | 1 |
> | 2 |
> -----
>
> mkdir -p DB ; rm -f DB/* ; tdbloader --loc=DB D.ttl
> tdbquery --loc=DB --file Q.rq7
> ==>
> -----
> | x |
> =====
> | 1 |
> | 2 |
> -----
>
> Andy
Re: Does ARQ list:member work with TDB?
Posted by Andy Seaborne <an...@apache.org>.
On 12/07/12 17:48, Stephan Zednik wrote:
> I am transitioning from in-memory models to TDB on a system and all my queries that leverage ARQ's list:member are no longer fully functioning.
>
> specifically, list:member is not longer being asserted and as such members of lists are no longer being described.
>
> My queries take the form:
>
> DESCRIBE ?service ?operation
> WHERE { ?service dcterms:identifier ?id .
> OPTIONAL { ?service ex:operations [ list:member ?operation ] }
> }
>
> and are run using the following code:
>
> protected Model _describe(JenaObject obj, String query, QuerySolutionMap params) {
> dataset.begin(ReadWrite.READ);
> try {
> QueryExecution qExec = QueryExecutionFactory.create(query, dataset, params);
> try {
> Model m = qExec.execDescribe();
> return m;
> } finally {
> qExec.close();
> }
> } finally {
> dataset.end();
> }
> }
>
> Thanks.
> --Stephan
>
Works for me.
Try this:
---- D.ttl
@prefix : <http://example/> .
:s :p ( 1 2 ) .
---- Q.rq
PREFIX : <http://example/>
PREFIX list: <http://jena.hpl.hp.com/ARQ/list#>
SELECT * { :s :p [ list:member ?x ] }
sparql --data D.ttl --query Q.rq
==>
-----
| x |
=====
| 1 |
| 2 |
-----
mkdir -p DB ; rm -f DB/* ; tdbloader --loc=DB D.ttl
tdbquery --loc=DB --file Q.rq7
==>
-----
| x |
=====
| 1 |
| 2 |
-----
Andy