fulinyun / swqp

Automatically exported from code.google.com/p/swqp
0 stars 0 forks source link

weird issue with using optional in virtuoso #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
oddly:

select  ?label  where{
?a 
<http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#hasCharacteristic>
 <http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#Camphor> .
OPTIONAL 
{<http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#Camphor> 
<http://www.w3.org/2000/01/rdf-schema#label> ?label .}
}

gives us ?label bindings as "Camphor". but:

select  ?label ?characteristic  where{
?a 
<http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#hasCharacteristic>
 ?characteristic .
OPTIONAL {?characteristic <http://www.w3.org/2000/01/rdf-schema#label> ?label .}
}

does not return us any bindings for ?label as "Camphor"........???

Original issue reported on code.google.com by apse...@gmail.com on 28 Nov 2012 at 7:47

GoogleCodeExporter commented 9 years ago
the virtuoso configuration is only allowing for 10,000 entries, so we are 
trying :

select distinct ?label ?characteristic  where{
?a 
<http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#hasCharacteristic>
 ?characteristic .
OPTIONAL {?characteristic <http://www.w3.org/2000/01/rdf-schema#label> ?label .}
} 

to resolve.

Original comment by apse...@gmail.com on 28 Nov 2012 at 6:32

GoogleCodeExporter commented 9 years ago
running the following in screen:

apseyed@was:/opt/virtuoso/bin$ ./isql 1111 dba dba < ~/get-char.txt > 
~/output.txt

where:

  $ cat get-char.txt 
sparql
select distinct ?label ?characteristic  where{
?a 
<http://escience.rpi.edu/ontology/semanteco/2/0/pollution.owl#hasCharacteristic>
 ?characteristic .
OPTIONAL {?characteristic <http://www.w3.org/2000/01/rdf-schema#label> ?label .}
}
;

Original comment by apse...@gmail.com on 28 Nov 2012 at 7:16

GoogleCodeExporter commented 9 years ago

Original comment by apse...@gmail.com on 29 Nov 2012 at 1:21

GoogleCodeExporter commented 9 years ago
was resolved by running the query locally with isql.

Original comment by apse...@gmail.com on 1 Dec 2012 at 5:15