/** * Creates incremental classifier by either creating it from scratch or by reading its state from file (if there exists such a state) * * @param ontology the ontology (the _current state of it) * @return the incremental classifier */ private IncrementalClassifier createIncrementalClassifier(final OWLOntology ontology) { final File saveFile = determineSaveFile(ontology); IncrementalClassifier result = null; // first try to restore the classifier from the file (if one exists) if (saveFile.exists()) result = loadIncrementalClassifier(ontology, saveFile); // if it was not possible to restore the classifier, create one from scratch if (result == null) result = new IncrementalClassifier(ontology); result.getReasoner().getKB().setTaxonomyBuilderProgressMonitor(OpenlletOptions.USE_CLASSIFICATION_MONITOR.create()); return result; }