Hi,
I’m using in-mem base and loading multiple named graphs in one data set,
iterating thru :
private static boolean loadGraphT(Dataset ds) {
…
String filename = …
String graphName = …
…
Model model = ds.getNamedModel(graphName);
ds.begin(ReadWrite.WRITE);
FileManager.get().readModel(model, fileName);
ds.commit();
ds.end();
return true;
}
At start, after everything is read and data set is committed, I’m printing out
the graph names and their sizes, to check, if everything was loaded:
2017-04-10 13:50:50 INFO Ontology:50 - Named graph aaa - 7855 triples
2017-04-10 13:50:50 INFO Ontology:50 - Named graph bbb - 26 triples
2017-04-10 13:50:50 INFO Ontology:50 - Named graph ccc - 4 triples
2017-04-10 13:50:50 INFO Ontology:50 - Named graph ddd - 20000 triples
…
After that I’m trying to query some data from a named graph:
SELECT count ($s)
FROM NAMED <aaa>
{
{ ?s ?p ?o }
}
or trying to query it without specifying graph:
SELECT count ($s)
{
{ ?s ?p ?o }
}
The result is empty:
{
"head": {
"vars": [ ".1" ]
} ,
"results": {
"bindings": [
{
".1": { "type": "literal" , "datatype":
"http://www.w3.org/2001/XMLSchema#integer" , "value": "0" }
}
]
}
}
What am I doing wrong?
S.