{
String query = readQuery();
// Create a repository with the query data
Sail sail = new MemoryStore();
if ("RDF".equals(entailment)) {
// do not add inferencers
}
else if ("RDFS".equals(entailment)) {
sail = new ForwardChainingRDFSInferencer(sail);
}
else if ("RDFS-VP".equals(entailment)) {
sail = new ForwardChainingRDFSInferencer(sail);
sail = new DirectTypeHierarchyInferencer(sail);
}
else {
sail.shutDown();
fail("Invalid value for entailment level:" + entailment);
}
Repository dataRep = new SailRepository(sail);
dataRep.initialize();