S
- covering type.U
- covered type.public class ContainmentIndex<S extends org.apache.uima.cas.text.AnnotationFS,U extends org.apache.uima.cas.text.AnnotationFS> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ContainmentIndex.Type |
Modifier | Constructor and Description |
---|---|
protected |
ContainmentIndex(org.apache.uima.cas.CAS cas,
org.apache.uima.cas.Type aSuper,
org.apache.uima.cas.Type aUnder,
ContainmentIndex.Type aType)
Create a new index on the given JCas using the specified two types.
|
Modifier and Type | Method and Description |
---|---|
Collection<U> |
containedIn(S aSuper)
Get all instances of the covered type contained within the boundaries of the specified instance
of the covering type.
|
Collection<S> |
containing(U aUnder)
Get all instances of the covering type containing the the specified instance of the covered
type.
|
static ContainmentIndex<org.apache.uima.cas.text.AnnotationFS,org.apache.uima.cas.text.AnnotationFS> |
create(org.apache.uima.cas.CAS cas,
org.apache.uima.cas.Type aSuper,
org.apache.uima.cas.Type aUnder,
ContainmentIndex.Type aType)
Factory method to create an index instead of using the constructor.
|
static <A extends org.apache.uima.cas.text.AnnotationFS,B extends org.apache.uima.cas.text.AnnotationFS> |
create(org.apache.uima.jcas.JCas aJcas,
Class<A> aSuper,
Class<B> aUnder,
ContainmentIndex.Type aType)
Factory method to create an index instead of using the constructor.
|
boolean |
isContainedIn(S aSuper,
U aUnder)
Checks if the given covered type is contained in the specified covering type.
|
boolean |
isContainedInAny(U aUnder)
Checks if the given covered type is contained in any instance of the covering type.
|
protected ContainmentIndex(org.apache.uima.cas.CAS cas, org.apache.uima.cas.Type aSuper, org.apache.uima.cas.Type aUnder, ContainmentIndex.Type aType)
cas
- the working JCas.aSuper
- the covering type.aUnder
- the covered type.aType
- the indexing strategy.public Collection<U> containedIn(S aSuper)
aSuper
- a covering type instance.public Collection<S> containing(U aUnder)
aUnder
- a covered type instance.public boolean isContainedIn(S aSuper, U aUnder)
aSuper
- the covering type instance.aUnder
- the covered type instance.public boolean isContainedInAny(U aUnder)
aUnder
- the covered type instance.public static <A extends org.apache.uima.cas.text.AnnotationFS,B extends org.apache.uima.cas.text.AnnotationFS> ContainmentIndex<A,B> create(org.apache.uima.jcas.JCas aJcas, Class<A> aSuper, Class<B> aUnder, ContainmentIndex.Type aType)
A
- covering type.B
- covered type.aJcas
- the working JCas.aSuper
- the covering type.aUnder
- the covered type.aType
- the indexing strategy.public static ContainmentIndex<org.apache.uima.cas.text.AnnotationFS,org.apache.uima.cas.text.AnnotationFS> create(org.apache.uima.cas.CAS cas, org.apache.uima.cas.Type aSuper, org.apache.uima.cas.Type aUnder, ContainmentIndex.Type aType)
cas
- the working JCas.aSuper
- the covering type.aUnder
- the covered type.aType
- the indexing strategy.Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.