for (OWLAxiom ax : axioms) {
if (ax.isAnnotationAxiom()) {
annotationAxioms.add(ax);
}
}
OWLOntologyLoaderConfiguration withAnnosConfig = new OWLOntologyLoaderConfiguration();
OWLOntology reloadedWithAnnoAxioms = reload(ontology, format,
withAnnosConfig);
Set<OWLAxiom> axioms2 = reloadedWithAnnoAxioms.getAxioms();
assertEquals(axioms, axioms2);
OWLOntologyLoaderConfiguration withoutAnnosConfig = new OWLOntologyLoaderConfiguration()
.setLoadAnnotationAxioms(false);
OWLOntology reloadedWithoutAnnoAxioms = reload(ontology, format,
withoutAnnosConfig);
assertFalse(axioms.equals(reloadedWithoutAnnoAxioms.getAxioms()));
Set<OWLAxiom> axiomsMinusAnnotationAxioms = new HashSet<>(axioms);