@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:Bookto be returned.Why is this not inferred? Do I have to enable this somewhere in the 4Store?Best regardsMax