K - The type of index terms that should be created for an annotation,
for example a String or an Integer. This type is also used by the
index map for the keys, where the generated index terms will go
to.@FunctionalInterface public interface IndexTermGenerator<K extends Comparable<K>>
An interface that defines a way to construct index or search terms from an
annotation a. Implementations are given to the constructor of
JCoReMapAnnotationIndex and are then internally used to create index
terms from annotations.
The class TermGenerators offers a range of predefined term
generators.
| Modifier and Type | Method and Description |
|---|---|
default K |
asKey(org.apache.uima.jcas.tcas.Annotation a)
Use this method when you know that this term generator returns single key
values.
|
default java.util.stream.Stream<K> |
asStream(org.apache.uima.jcas.tcas.Annotation a)
Use this method when you know that this term generator returns a stream.
|
Object |
generateIndexTerms(org.apache.uima.jcas.tcas.Annotation a)
Generates a single index term or a stream of index terms for the
annotation a.
|
Object generateIndexTerms(org.apache.uima.jcas.tcas.Annotation a)
asKey(Annotation) or
asStream(Annotation) might be used instead.a - The annotation to generate terms for.default java.util.stream.Stream<K> asStream(org.apache.uima.jcas.tcas.Annotation a)
default K asKey(org.apache.uima.jcas.tcas.Annotation a)
Copyright © 2018 JULIE Lab Jena, Germany. All rights reserved.