Hi:
I'm trying to obtain the explanation of an inference over HTTP but I cannot make it work.
I have added RDF and an ontology with a property chain to Stardog (6.1.1) and the inference works, since this query returns nothing with reasoning off, and a set of bindings with the reasoning on, as a result of the property chain:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX voc:<https://company.org/def/CompanySchema#>
SELECT ?department ?expertise
WHERE {
?department rdf:type voc:Department .
?department voc:requiresExpertise ?expertise
}
I'm trying to retrieve the explanations with the following request:
curl -u admin:admin -X POST -H "Content-Type: text/turtle" --data "@explainPropertyChain.ttl" http://localhost:5820/SAFRAN-reasoning/reasoning/explain
The content of explainPropertyChain.ttl
being one of the triples retrieved by the query with reasoning on:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX voc: <https://company.org/def/CompanySchema#>
PREFIX department: <https://company.org/id/department/>
PREFIX expertise: <https://company.org/id/expertise/>
department:41622 voc:requiresExpertise expertise:Compensator .
However the response of the HTTP request is an empty set of proofs:
{
"proofs": []
}
What am I missing?
Thank you,
[UPDATE]
Adding an axiom to make the ontology inconsistent:
PREFIX voc:<https://company.org/def/CompanySchema#>
INSERT DATA {
voc:Manager owl:disjointWith voc:ProductManager .
}
And retrieving the explanation of inconsistency does work:
curl -u admin:admin -X GET http://localhost:5820/SAFRAN/reasoning/explain/inconsistency
{
"proofs": [
{
"status": "VIOLATED",
"expression": "@prefix : \u003chttp://api.stardog.com/\u003e .\n@prefix rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e .\n@prefix rdfs: \u003chttp://www.w3.org/2000/01/rdf-schema#\u003e .\n@prefix xsd: \u003chttp://www.w3.org/2001/XMLSchema#\u003e .\n@prefix owl: \u003chttp://www.w3.org/2002/07/owl#\u003e .\n@prefix stardog: \u003ctag:stardog:api:\u003e .\n\n\u003chttps://company.org/def/CompanySchema#Manager\u003e owl:disjointWith \u003chttps://company.org/def/CompanySchema#ProductManager\u003e .",
"children": [
{
"status": "ASSERTED",
"expression": "@prefix : \u003chttp://api.stardog.com/\u003e .\n@prefix rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e .\n@prefix rdfs: \u003chttp://www.w3.org/2000/01/rdf-schema#\u003e .\n@prefix xsd: \u003chttp://www.w3.org/2001/XMLSchema#\u003e .\n@prefix owl: \u003chttp://www.w3.org/2002/07/owl#\u003e .\n@prefix stardog: \u003ctag:stardog:api:\u003e .\n\n\u003chttps://company.org/def/CompanySchema#Manager\u003e owl:disjointWith \u003chttps://company.org/def/CompanySchema#ProductManager\u003e .",
"children": [],
"namedGraphs": []
},
{
"status": "INFERRED",
"expression": "@prefix : \u003chttp://api.stardog.com/\u003e .\n@prefix rdf: \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#\u003e .\n@prefix rdfs: \u003chttp://www.w3.org/2000/01/rdf-schema#\u003e .\n@prefix xsd: \u003chttp://www.w3.org/2001/XMLSchema#\u003e .\n@prefix owl: \u003chttp://www.w3.org/2002/07/owl#\u003e .\n@prefix stardog: \u003ctag:stardog:api:\u003e .\n\n\u003chttps://company.org/id/lambert-faust\u003e a \u003chttps://company.org/def/CompanySchema#ProductManager\u003e .",
"children": [
...
So I'm doing something wrong on the request but I cannot pin it
[UPDATE 2]
Explanation also works for new triples inferred trough SWRL rule. So, so far:
- Explanation works: consistency, SWRL.
- Explanation does not work (states there is nothing to explain): property chain, class expression.