Class BrowserTextUtil

  extended by edu.uchsc.ccp.knowtator.BrowserTextUtil

public class BrowserTextUtil
extends Object

Philip V. Ogren

Field Summary
Constructor Summary
BrowserTextUtil(AnnotationUtil annotationUtil, MentionUtil mentionUtil, KnowtatorProjectUtil kpu)
          Creates a new instance of BrowserText
Method Summary
 Comparator<SimpleInstance> comparator()
 String getBrowserText(SimpleInstance instance)
          The BrowserSlotPattern in the Protege code does not work very well with annotations and their mentions.
 String getBrowserText(SimpleInstance instance, int maxLength)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final String ANNOTATION_TEXT
See Also:
Constant Field Values
Constructor Detail


public BrowserTextUtil(AnnotationUtil annotationUtil,
                       MentionUtil mentionUtil,
                       KnowtatorProjectUtil kpu)
Creates a new instance of BrowserText

Method Detail


public String getBrowserText(SimpleInstance instance,
                             int maxLength)


public String getBrowserText(SimpleInstance instance)
The BrowserSlotPattern in the Protege code does not work very well with annotations and their mentions. This code generates browser text that tries to capture the BrowserSlotPatterns of the Instances and Clses that are being mentioned/annotated. If an annotation is passed in, then the instance.getBrowserText() will be returned if there is any. This will typically be the text found in knowtator_annotation_text. If there is no text returned, then text corresponding to the annotated mention will be returned via a recursive call (see next paragraph). If a mention is passed in, then a browser text corresponding to the BrowserSlotPattern of the mentioned cls will be constructed. Much of this code was copied and modified from


public Comparator<SimpleInstance> comparator()