Hi Samuel,
I think you need to do something like the following:
OWLOntologyManager man = OWLManager.createOWLOntologyManager();
// Create an ELK reasoner configuration
final ElkReasonerConfiguration elkConfig = new ElkReasonerConfiguration();
// Set the number of workers to 4 or any other number
elkConfig.getElkConfiguration().setParameter(ReasonerConfiguration.NUM_OF_WORKING_THREADS,
"4");
// Load your ontology.
OWLOntology ont = man.loadOntologyFromOntologyDocument(new
File("c:/ontologies/ontology.owl"));
// Create an ELK reasoner using the configuration
OWLReasonerFactory reasonerFactory = new ElkReasonerFactory();
OWLReasoner reasoner = reasonerFactory.createReasoner(ont, elkConfig);
Let me know if it works or not.
Be warned, however, that this method is not stable and may change in the future.
I think, you can also set the number of workers using a .properties
file. Pavel should know more how to do that exactly.
Yevgeny