S - covering type.U - covered type.public class ContainmentIndex<S extends AnnotationFS,U extends AnnotationFS> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ContainmentIndex.Type |
| Modifier | Constructor and Description |
|---|---|
protected |
ContainmentIndex(CAS cas,
Type aSuper,
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<AnnotationFS,AnnotationFS> |
create(CAS cas,
Type aSuper,
Type aUnder,
ContainmentIndex.Type aType)
Factory method to create an index instead of using the constructor.
|
static <A extends AnnotationFS,B extends AnnotationFS> |
create(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(CAS cas, Type aSuper, 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 AnnotationFS,B extends AnnotationFS> ContainmentIndex<A,B> create(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<AnnotationFS,AnnotationFS> create(CAS cas, Type aSuper, Type aUnder, ContainmentIndex.Type aType)
cas - the working JCas.aSuper - the covering type.aUnder - the covered type.aType - the indexing strategy.Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.