Set<OBONamespace> namespaces = new HashSet<OBONamespace>();
for(OWLAnnotation anno : project.getRootOntology().getAnnotations()) {
if(isNamespaceAnnotation(anno)) {
if(anno.getValue() instanceof OWLLiteral) {
OWLLiteral lit = (OWLLiteral) anno.getValue();
namespaces.add(new OBONamespace(lit.getLiteral()));
}
}
}
for(OWLClass cls : project.getRootOntology().getClassesInSignature(true)) {
for(OWLAnnotationAssertionAxiom ax : cls.getAnnotationAssertionAxioms(project.getRootOntology())) {
if(isNamespaceAnnotationProperty(ax)) {
if(ax.getValue() instanceof OWLLiteral) {
OWLLiteral lit = (OWLLiteral) ax.getValue();
namespaces.add(new OBONamespace(lit.getLiteral()));
}
}
}
}
try {