good afternoon;

> On 2018-02-08, at 12:11, Claude Warren <cla...@xenei.com> wrote:
> 
> Wouldn't the union graph provide different answers in some cases?
> 
> for example
> 
> g2 contains
> 
> ?sub rdfs:subClassOf  ex:foo
> 
> and g3 contains
> 
> ex:foo rdfs:subClassOf <http://xmlns.com/foaf/0.1/Person> .
> 
> the original query would not resolve
> 
> ?sub *rdfs:subClassOf** <http://xmlns.com/foaf/0.1/Person> .
> 

note 18.1.7 (https://www.w3.org/TR/sparql11-query/#sparqlPropertyPaths):

    A property path does not span multiple graphs in a dataset.

while this indicates a path would not cross named graph boundaries, one can 
specify that the target dataset merge all graphs into the default graph.
if the query’s dataset definition accomplishes this, then the path should be 
visible.

> would it?
> 
> but the union graph would.
> 
> At least I think that is the case.
> 
> 
> On Thu, Feb 8, 2018 at 8:39 AM, Jean-Marc Vanel <jeanmarc.va...@gmail.com>
> wrote:
> 
>> Hi
>> 
>> I wonder about performance of  arbitrary length path in Jena :
>> https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#
>> propertypath-arbitrary-length
>> 
>> For example , here is the query in semantic_forms for searching a string
>> with a type class. I added yesterday the rdfs:subClassOf* pattern.
>> I wonder if it would not be more efficient with the unionGraph instead of
>> numerous GRAPH blocks .
>> 
>> PREFIX text: <http://jena.apache.org/text#>
>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>> PREFIX form: <
>> http://raw.githubusercontent.com/jmvanel/semantic_forms/
>> master/vocabulary/forms.owl.ttl#
>>> 
>> 
>> SELECT DISTINCT ?thing ?COUNT WHERE {
>> ?thing text:query ( 'Jean*' ) .
>> 
>> graph ?g1 {
>>   ?thing a ?sub .
>> }
>> graph ?g2 {
>>   ?sub *rdfs:subClassOf** <http://xmlns.com/foaf/0.1/Person> .
>> } .
>> OPTIONAL {
>>   graph ?grCount {
>>    ?thing form:linksCount ?COUNT.
>>  } }
>> }
>> ORDER BY DESC(?COUNT)
>> LIMIT 10
>> 
>> 
>> --
>> Jean-Marc Vanel
>> http://www.semantic-forms.cc:9111/display?displayuri=http:/
>> /jmvanel.free.fr/jmv.rdf%23me#subject
>> <http://www.semantic-forms.cc:9111/display?displayuri=http:/
>> /jmvanel.free.fr/jmv.rdf%23me>
>> Déductions SARL - Consulting, services, training,
>> Rule-based programming, Semantic Web
>> +33 (0)6 89 16 29 52
>> Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
>> 
> 
> 
> 
> -- 
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to