You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Milorad Tosic <mb...@yahoo.com> on 2012/07/09 14:45:12 UTC

blank nodes in ARQ


Hi,

I am aware of some earlier discussions on the list about blank nodes as well as discussions on other places (e.g. [1]). So, my intention here is not to launch a general purpose theoretic discussion here. Instead, I would focus on the following question:

In the paper [2], authors say: "For example, ARQ is a commonly (re)used SPARQL processor which supports a non-standard <_:b1> style syntax for terms in queries, indicating that the term can only be bound by a blank node labeled “b1” in the data." However, a simple query like the following


SELECT DISTINCT ?pp ?oo
WHERE {
 <_:b1> ?pp ?oo .
}

gives an empty result set even though query

SELECT DISTINCT ?s ?pp ?oo
WHERE {
 ?s ?pp ?oo .
 FILTER (isBlank(?s))
}

gives result set where _:b1 appears several times.

So, the question is whether I am using wrong syntax or something has changed in ARQ or else?

Thanks,

Milorad


[1] http://www.w3.org/wiki/BnodeSkolemization
[2] web.ing.puc.cl/~marenas/publications/iswc11.pdf 

Re: blank nodes in ARQ

Posted by Milorad Tosic <mb...@yahoo.com>.
Andy,

Could you give an Java code illustrative example for the second case where ARQ.enableBlankNodeResultLabels(true) ; is used in Java code to configure SPARQL engine? I'm probably missing something here and believe the example may help. I assume the method is static configuration method and if used in any stage of init chain it should work (or any other moment before the SPARQL query is executed). Unfortunately, it has no effect in my case.


Thanks,
Milorad




>________________________________
> From: Andy Seaborne <an...@apache.org>
>To: users@jena.apache.org 
>Sent: Monday, July 9, 2012 3:46 PM
>Subject: Re: blank nodes in ARQ
> 
>On 09/07/12 13:45, Milorad Tosic wrote:
>>
>>
>> Hi,
>>
>> I am aware of some earlier discussions on the list about blank nodes as well as discussions on other places (e.g. [1]). So, my intention here is not to launch a general purpose theoretic discussion here. Instead, I would focus on the following question:
>>
>> In the paper [2], authors say: "For example, ARQ is a commonly (re)used SPARQL processor which supports a non-standard <_:b1> style syntax for terms in queries, indicating that the term can only be bound by a blank node labeled “b1” in the data." However, a simple query like the following
>>
>>
>> SELECT DISTINCT ?pp ?oo
>> WHERE {
>>   <_:b1> ?pp ?oo .
>
>This must the internal identifier,and "b1" is not that.
>
>You need to get the real internal identifier:
>
>1/ At the API, it's the AnonId from Resource.getId();
>2/ To get the protocol engine to expose internal identifiers, ensure the 
>server is running with these context settings
>
>Call
>ARQ.enableBlankNodeResultLabels(true) ;
>
>The TSV format output outputs (encoded) bnodes internal identifiers anyway.
>
>> }
>>
>> gives an empty result set even though query
>>
>> SELECT DISTINCT ?s ?pp ?oo
>> WHERE {
>>   ?s ?pp ?oo .
>>   FILTER (isBlank(?s))
>> }
>>
>> gives result set where _:b1 appears several times.
>
>Irrelevent :-)
>
>That "_:b1" is, I guess, the result-file-scoped translation,  Normally 
>internal identifiers aren't exposed.
>
>>
>> So, the question is whether I am using wrong syntax or something has changed in ARQ or else?
>
>What's your setup?  How are you making the query?
>
>>
>> Thanks,
>>
>> Milorad
>>
>>
>> [1] http://www.w3.org/wiki/BnodeSkolemization
>> [2] web.ing.puc.cl/~marenas/publications/iswc11.pdf
>>
>
>
>
>
>

Re: blank nodes in ARQ

Posted by Andy Seaborne <an...@apache.org>.
On 09/07/12 13:45, Milorad Tosic wrote:
>
>
> Hi,
>
> I am aware of some earlier discussions on the list about blank nodes as well as discussions on other places (e.g. [1]). So, my intention here is not to launch a general purpose theoretic discussion here. Instead, I would focus on the following question:
>
> In the paper [2], authors say: "For example, ARQ is a commonly (re)used SPARQL processor which supports a non-standard <_:b1> style syntax for terms in queries, indicating that the term can only be bound by a blank node labeled “b1” in the data." However, a simple query like the following
>
>
> SELECT DISTINCT ?pp ?oo
> WHERE {
>   <_:b1> ?pp ?oo .

This must the internal identifier,and "b1" is not that.

You need to get the real internal identifier:

1/ At the API, it's the AnonId from Resource.getId();
2/ To get the protocol engine to expose internal identifiers, ensure the 
server is running with these context settings

Call
ARQ.enableBlankNodeResultLabels(true) ;

The TSV format output outputs (encoded) bnodes internal identifiers anyway.

> }
>
> gives an empty result set even though query
>
> SELECT DISTINCT ?s ?pp ?oo
> WHERE {
>   ?s ?pp ?oo .
>   FILTER (isBlank(?s))
> }
>
> gives result set where _:b1 appears several times.

Irrelevent :-)

That "_:b1" is, I guess, the result-file-scoped translation,  Normally 
internal identifiers aren't exposed.

>
> So, the question is whether I am using wrong syntax or something has changed in ARQ or else?

What's your setup?  How are you making the query?

>
> Thanks,
>
> Milorad
>
>
> [1] http://www.w3.org/wiki/BnodeSkolemization
> [2] web.ing.puc.cl/~marenas/publications/iswc11.pdf
>