private String labelFor(@Nonnull OWLClass clazz) {
/*
* Use a visitor to extract label annotations
*/
LabelExtractor le = new LabelExtractor();
for (OWLAnnotation anno : annotations(ontology
.getAnnotationAssertionAxioms(clazz.getIRI()))) {
anno.accept(le);
}
/* Print out the label if there is one. If not, just use the class URI */
if (le.getResult() != null) {
return le.getResult();
} else {
return clazz.getIRI().toString();
}
}