HCLSIG BioRDF Subgroup/QueryFederation/dbpedia inferencing
HCLSIG BioRDF Subgroup/QueryFederation/DBpedia Inferencing
For our use case, we are interested in Virtuoso's support for inferencing over the transitive closure of rdfs:subClassOf.
To retrieve just the classes in the hierarchy, use a query of the form (http://tinyurl.com/b8l3sh, only works on Virtuoso 6):
select ?x from <http://dbpedia.org/resource/classes/yago#> where { { select * where { ?x rdfs:subClassOf ?y . } } option (transitive, t_distinct, t_in (?x), t_out (?y) ) . filter (?y = <http://dbpedia.org/class/yago/Structure105225602>) }
To retrieve instances of classes in the hierarchy, use a query of the form (http://tinyurl.com/cvfzeu):
define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX yago:<http://dbpedia.org/class/yago/> SELECT DISTINCT ?receptor from <http://dbpedia.org/resource/classes/yago#> WHERE { ?receptor a yago:Receptor105608868 . }