I am too new to this concept, i don't know how to add the reasoner to my files,query execution is given me a wrong answer for sure and i don't find a good resource to explain how so please help.
here is my configuration ttl file
@prefix : <http://base/#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
<http://jena.apache.org/2016/tdb#DatasetTDB>
rdfs:subClassOf ja:RDFDataset .
ja:DatasetTxnMem rdfs:subClassOf ja:RDFDataset .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
:service1 a fuseki:Service ;
fuseki:dataset :dataset ;
fuseki:name "eduDataSet" ;
fuseki:serviceQuery "" , "query" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadQuads "" ;
fuseki:serviceReadWriteGraphStore
"data" ;
fuseki:serviceReadWriteQuads "" ;
fuseki:serviceUpdate "update" , "" ;
fuseki:serviceUpload "upload" .
tdb:GraphTDB rdfs:subClassOf ja:Model .
<http://jena.apache.org/2016/tdb#GraphTDB2>
rdfs:subClassOf ja:Model .
ja:MemoryDataset rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetZero rdfs:subClassOf ja:RDFDataset .
<http://jena.apache.org/text#TextDataset>
rdfs:subClassOf ja:RDFDataset .
<http://jena.apache.org/2016/tdb#GraphTDB>
rdfs:subClassOf ja:Model .
ja:RDFDatasetOne rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetSink rdfs:subClassOf ja:RDFDataset .
:dataset a ja:DatasetTxnMem .
<http://jena.apache.org/2016/tdb#DatasetTDB2>
rdfs:subClassOf ja:RDFDataset .
this is the query i am running :
String queryString =
"PREFIX rdfs:<http://example#>"
+ "PREFIX ns:<http://example>"
+ "PREFIX rdf:<http://example#>"
+ "SELECT ?x ?id ?name ?description ?depth "
+ "WHERE {"
+ "?Individuals rdf:type ns:Ontology."
+ "?Individuals ns:ontologyId \"" + myid + "\"."
+ "?Individuals ns:onthas ?y" + "."
+ "?y ns:id \""+cid+"\"."
+ "?y ns:before ?x."
+ "?x ns:id ?id."
+ "?x ns:name ?name."
+ "?x ns:description ?description."
+ "?x ns:depth_level ?depth."
+ "}";
for example this is what i suppose to get:
[
- {
depth: "1",
name: "Stack Operations",
description: "Stack operation Course",
ontologyId: "ont1",
id: "SO"
},
- {
depth: "1",
name: "Stack Applications",
description: "Stack application Course",
ontologyId: "ont1",
id: "SAPP"
},
- {
depth: "2",
name: "Stack Implementations",
description: "stack implementation Course",
ontologyId: "ont1",
id: "SI"
}
]
But this is what i am getting :
[
- {
depth: "1",
name: "Stack Operations",
description: "Stack operation Course",
ontologyId: "ont1",
id: "SO"
}
]
note: before fuseki i was running on tomcat server and i was getting the right answer but now i am not and i think it is relating to the reasoning!