OntologyManager ontMgr = workspace.getOntologyManager();
File autoOtologyFile = new File(path);
logger.info("Loading ontology: " + autoOtologyFile.getAbsolutePath());
String encoding = EncodingDetector.detect(autoOtologyFile);
try {
ontMgr.doImportAndUpdateCache(autoOtologyFile, encoding);
logger.info("Done loading ontology: "
+ autoOtologyFile.getAbsolutePath());
} catch(Exception e) {
logger.error("Error importing auto ontology file: " + autoOtologyFile.getAbsolutePath());
}