Reputation: 11
I have setup GraphDB SE trial version and trying out inference functionality with OWL2-RL ruleset. I have built a simple SKOS knowledge with a single broader relationship. Some how, when I try to query for narrower relationship am not getting any results. Am I going wrong in the usage ?
Insertion:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
INSERT DATA {
ex:mammals rdf:type skos:Concept;
skos:prefLabel "mammals"@en;
ex:animals rdf:type skos:Concept;
skos:prefLabel "animals"@en;
skos:broader ex:mammals .
}
Query:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select * where {
?s skos:narrower ?o .
}
In the query result I don't see any response. Shouldn't it return below result - ex:mammals skos:narrower ex:animals
Upvotes: 1
Views: 299
Reputation: 1
Since inference might be heavy on writes, it's often disabled by default.
Whatever tool you're using (e.g. GraphDB, RDF4J), make sure that inferencing is enabled. You are obviously querying a non-explicit data.
Upvotes: 0
Reputation: 462
I just came across this question and the OP is correct: Although the official SKOS reference explicitly states that skos:broader
and skos:narrower
are inverse, the actual RDF implementation does not include this statement. However, properties skos:broaderTransitive
and skos:narrowerTransitive
are declared as inverse.
And, although not relevant to the original question, the implementation does not state properties skos:topConceptOf
and skos:hasTopConcept
as inverse either.
Upvotes: -1