* Gets the browser text for a given OWLObject.
* @param object The object.
* @return The browser text for the object.
*/
public String getBrowserText(OWLObject object) {
OWLObjectRenderer owlObjectRenderer = new ManchesterOWLSyntaxOWLObjectRendererImpl();
if (object instanceof OWLEntity || object instanceof IRI) {
owlObjectRenderer.setShortFormProvider(shortFormProvider);
}
else {
owlObjectRenderer.setShortFormProvider(new EscapingShortFormProvider(shortFormProvider));
}
String browserText = owlObjectRenderer.render(object);
if(browserText == null) {
return NULL_BROWSER_TEXT;
}
return browserText;
}