How to enable inference when querying the triple store?

13 views
Skip to first unread message

Max

unread,
Dec 8, 2015, 7:25:22 AM12/8/15
to 4store-support
Please consider the following data I inserted into the triplestore:
 
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix mo: <http://example.com/my-ontology#> .

mo
:Author a rdfs:Class .
mo
:Book a rdfs:Class .

mo
:isAuthorOf a rdf:Property .
mo
:isAuthorOf rdfs:domain mo:Author .
mo
:isAuthorOf rdfs:range mo:Book .

mo
:author1 a mo:Author .
mo
:author1 mo:isAuthorOf mo:macbeth .

If I execute a simple query like

SELECT ?s ?p ?o
WHERE
{
 
{ ?s ?p ?o }
}

it works: all triples are returned.

However, when executing the following query 

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs
: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mo
: <http://example.com/my-ontology#>

SELECT
?o
WHERE
{
 
{ mo:macbeth a ?o }
}

I don't get any result. I expected 

Book

for the triple

mo:macbeth a mo:Book

to be returned. 

Why is this not inferred? Do I have to enable this somewhere in the 4Store?

Best regards
Max

Reply all
Reply to author
Forward
0 new messages