From: <sha...@us...> - 2012-03-15 03:22:39
|
Revision: 3613 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3613&view=rev Author: shadowtm Date: 2012-03-15 03:22:33 +0000 (Thu, 15 Mar 2012) Log Message: ----------- Updated OWLManager instantiation so that it would use a separate OWLDataFactory per thread rather than the shared static one - this could cause problems in a multithreaded environment. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2012-03-15 03:17:12 UTC (rev 3612) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2012-03-15 03:22:33 UTC (rev 3613) @@ -45,6 +45,7 @@ import org.semanticweb.owlapi.vocab.PrefixOWLOntologyFormat; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasonerFactory; +import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; import java.io.File; import java.net.URI; @@ -130,8 +131,8 @@ stringDatatypeProperties = new TreeSet<DatatypeProperty>(); individuals = new TreeSet<Individual>(); - // create OWL API ontology manager - manager = OWLManager.createOWLOntologyManager(); + // create OWL API ontology manager - make sure we use a new data factory so that we don't default to the static one which can cause problems in a multi threaded environment. + manager = OWLManager.createOWLOntologyManager(new OWLDataFactoryImpl()); // it is a bit cumbersome to obtain all classes, because there // are no reasoner queries to obtain them => hence we query them This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |