return alternateShortFormProvider.getShortForm(entity);
}
OWLIndividual individual = (OWLIndividual) entity;
// The candidate value to be rendered, we select this based on
// ranking of annotation URI and ranking of lang (if present)
OWLObject candidateValue = null;
int lastURIMatchIndex = Integer.MAX_VALUE;
int lastLangMatchIndex = Integer.MAX_VALUE;
for (OWLOntology ontology : ontologySetProvider.getOntologies()) {
for (OWLObjectPropertyAssertionAxiom ax : ontology
.getObjectPropertyAssertionAxioms(individual)) {
int index = properties.indexOf(ax.getProperty());
if (index == -1) {
continue;
}
if (index < lastURIMatchIndex) {
candidateValue = ax.getObject();
}
}
for (OWLDataPropertyAssertionAxiom ax : ontology
.getDataPropertyAssertionAxioms(individual)) {
int index = properties.indexOf(ax.getProperty());
if (index == -1) {
continue;
}
if (index == lastURIMatchIndex) {
// Different property value but same prop, as previous
// candidate - look at lang tag for that URI
// and see if we take priority over the previous one
OWLObject obj = ax.getObject();
if (obj instanceof OWLLiteral) {
List<String> langList = preferredLanguageMap.get(ax
.getProperty());
if (langList != null) {
// There is no need to check if lang is null. It may