use of org.semanticweb.HermiT.Configuration in project stanbol by apache.
the class HermitReasoningService method getReasoner.
@Override
protected OWLReasoner getReasoner(OWLOntology ontology) {
log.debug("Creating HermiT reasoner: {}", ontology);
Configuration config = new Configuration();
// This must be true!
config.ignoreUnsupportedDatatypes = true;
// This must be true!
config.throwInconsistentOntologyException = true;
//config.monitor = new Debugger(null, false);
log.debug("Configuration: {}, debugger {}", config, config.monitor);
ReasonerFactory risfactory = new ReasonerFactory();
log.debug("factory: {}", risfactory);
OWLReasoner reasoner = null;
reasoner = risfactory.createReasoner(ontology, config);
log.debug("Reasoner : {}", reasoner);
if (reasoner == null) {
log.error("Cannot create the reasner!!");
throw new IllegalArgumentException("Cannot create the reasoner");
}
return reasoner;
}
Aggregations