E - The annotation type to index.public class JCoReSetAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation> extends Object implements JCoReAnnotationIndex<E>
Use when: You just want an ordered set of annotations that can be retrieved
according to an Comparator. If you want the search keys to be of
another type than the annotations in the index or even keys not being
annotations at all, look at JCoReMapAnnotationIndex and its
subclasses.
TreeSet| Constructor and Description |
|---|
JCoReSetAnnotationIndex(Comparator<? super E> comparator) |
JCoReSetAnnotationIndex(Comparator<? super E> comparator,
org.apache.uima.jcas.JCas jCas,
int type) |
JCoReSetAnnotationIndex(Comparator<? super E> comparator,
org.apache.uima.jcas.JCas jCas,
org.apache.uima.cas.Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E annotation)
The same as
index(Annotation). |
boolean |
contains(org.apache.uima.jcas.tcas.Annotation a) |
E |
get(E a) |
TreeSet<E> |
getIndex() |
void |
index(E annotation)
Indexes the given annotation.
|
void |
index(org.apache.uima.jcas.JCas jCas,
int type)
Indexes the whole contents of the CAS annotation index of type
type.
|
void |
index(org.apache.uima.jcas.JCas jCas,
org.apache.uima.cas.Type type)
Indexes the whole contents of the CAS annotation index of type
type.
|
java.util.stream.Stream<E> |
items() |
java.util.stream.Stream<E> |
search(E a) |
NavigableSet<E> |
searchSubset(E a) |
public JCoReSetAnnotationIndex(Comparator<? super E> comparator, org.apache.uima.jcas.JCas jCas, org.apache.uima.cas.Type type)
public JCoReSetAnnotationIndex(Comparator<? super E> comparator, org.apache.uima.jcas.JCas jCas, int type)
public JCoReSetAnnotationIndex(Comparator<? super E> comparator)
public void index(org.apache.uima.jcas.JCas jCas,
int type)
#indexTermGenerator is
used to create terms with which the annotation will be associated in the
index and can be retrieved by a search method.index in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>jCas - A CAS instance.type - The annotation type to index.public void index(org.apache.uima.jcas.JCas jCas,
org.apache.uima.cas.Type type)
#indexTermGenerator is
used to create terms with which the annotation will be associated in the
index and can be retrieved by a search method.index in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>jCas - A CAS instance.type - The annotation type to index.public void index(E annotation)
index in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>annotation - The annotation to add to the index.public void add(E annotation)
index(Annotation).add in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>annotation - The annotation to add to the index.public java.util.stream.Stream<E> search(E a)
public NavigableSet<E> searchSubset(E a)
public boolean contains(org.apache.uima.jcas.tcas.Annotation a)
public java.util.stream.Stream<E> items()
Copyright © 2018 JULIE Lab Jena, Germany. All rights reserved.