Package org.apache.uima.tools.viewer
Class CasAnnotationViewer.DefaultEntityResolver
java.lang.Object
org.apache.uima.tools.viewer.CasAnnotationViewer.DefaultEntityResolver
- All Implemented Interfaces:
EntityResolver
- Enclosing class:
CasAnnotationViewer
Trivial entity resolver that's applied if the user turns on entity mode without specifying
their own entity resolver. Returns the covered text as the canonical form, and treats
annotations with equal covered text as belonging to the same entity.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.uima.tools.viewer.EntityResolver
EntityResolver.Entity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEntity
(Annotation inAnnotation) Returns theEntity
to which an annotation refers.
-
Constructor Details
-
DefaultEntityResolver
public DefaultEntityResolver()
-
-
Method Details
-
getEntity
Description copied from interface:EntityResolver
Returns theEntity
to which an annotation refers. Returns the canonical form String for an annotation.For two annotations that refer to the same Entity, this should return
Entity
objects that areequal
.If the annotation does not represent an entity at all,
null
should be returned.- Specified by:
getEntity
in interfaceEntityResolver
- Parameters:
inAnnotation
- the annotation to resolve- Returns:
- the Entity to which the annotation refers, null if the annotation does not represent an
-