E - public class JCoReCoverIndex<E extends org.apache.uima.jcas.tcas.Annotation> extends Object implements JCoReAnnotationIndex<E>
Use when: You need access to annotations between a given begin- and end-offset or completely covered by another annotation.
Allows efficient access to annotation which are covered completely by a given begin - end offset span.| Constructor and Description |
|---|
JCoReCoverIndex() |
JCoReCoverIndex(org.apache.uima.jcas.JCas jcas,
int type) |
JCoReCoverIndex(org.apache.uima.jcas.JCas jcas,
org.apache.uima.cas.Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E a) |
void |
freeze()
Freeze the index to allow searching it.
|
void |
index(E annotation)
Adds annotation into the index data structure.
|
void |
index(org.apache.uima.jcas.JCas jCas,
int type)
Adds the whole contents of the CAS annotation index of type type
into the index data structure.
|
void |
index(org.apache.uima.jcas.JCas jCas,
org.apache.uima.cas.Type type)
Adds the whole contents of the CAS annotation index of type type
into the index data structure.
|
void |
melt()
Un-freeze the index to allow new elements to be added.
|
java.util.stream.Stream<E> |
search(org.apache.uima.jcas.tcas.Annotation a)
Returns all annotations in this index that are completely covered by the
annotation a.
|
java.util.stream.Stream<E> |
search(int begin,
int end)
Returns all annotations in this index that are completely covered by the
span given by begin and end.
|
public JCoReCoverIndex()
public JCoReCoverIndex(org.apache.uima.jcas.JCas jcas,
int type)
public JCoReCoverIndex(org.apache.uima.jcas.JCas jcas,
org.apache.uima.cas.Type type)
public void freeze()
public void melt()
public void index(org.apache.uima.jcas.JCas jCas,
int type)
freeze() the index and then search(int, int) it.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)
freeze() the index and then search(int, int) it.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)
freeze() the index and then
search(int, int) it.index in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>jCas - A CAS instance.type - The annotation type to index.public java.util.stream.Stream<E> search(org.apache.uima.jcas.tcas.Annotation a)
a - The annotation for which contained annotations should be
returned.public java.util.stream.Stream<E> search(int begin, int end)
begin - The lowest offset where returned annotations may begin.end - The largest offset where returned annotations may end.public void add(E a)
add in interface JCoReAnnotationIndex<E extends org.apache.uima.jcas.tcas.Annotation>Copyright © 2018 JULIE Lab Jena, Germany. All rights reserved.