public class JFSIndexRepositoryImpl extends Object implements JFSIndexRepository
Modifier and Type | Method and Description |
---|---|
<T extends TOP> |
getAllIndexedFS(int aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its
subtypes).
|
<T extends TOP> |
getAllIndexedFS(Type aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its
subtypes).
|
AnnotationIndex<Annotation> |
getAnnotationIndex()
Get the standard annotation index.
|
<T extends Annotation> |
getAnnotationIndex(int type)
Get the standard annotation index restricted to a specific annotation type.
|
FSIndexRepository |
getFSIndexRepository()
Get the underlying FSIndexRepository associated with this JFSIndexRepository.
|
<T extends TOP> |
getIndex(String label)
Retrieve an index according to a label.
|
<T extends TOP> |
getIndex(String label,
int type)
Retrieve an index according to a label and a type.
|
Iterator<FSIndex<TOP>> |
getIndexes()
Get all indexes in this repository.
|
Iterator<String> |
getLabels()
Get all labels for all indexes.
|
public <T extends TOP> FSIndex<T> getIndex(String label)
JFSIndexRepository
getIndex
in interface JFSIndexRepository
T
- the Java class corresponding to the top most type defined by this indexlabel
- The name of the index.label
, or null
if no such index is
defined.public <T extends TOP> FSIndex<T> getIndex(String label, int type)
JFSIndexRepository
getIndex
in interface JFSIndexRepository
T
- the Java class corresponding to the typelabel
- The name of the indextype
- A subtype of the type of the index, written as Foo.typenull
if an index with that name doesn't exist, or
it exists but type
is not a subtype of the index's type.public AnnotationIndex<Annotation> getAnnotationIndex()
JFSIndexRepository
getAnnotationIndex
in interface JFSIndexRepository
public <T extends Annotation> AnnotationIndex<T> getAnnotationIndex(int type)
JFSIndexRepository
getAnnotationIndex
in interface JFSIndexRepository
T
- the Java class corresponding to typetype
- The annotation type the index is restricted to, written as Foo.typetype
.public Iterator<String> getLabels()
JFSIndexRepository
getLabels
in interface JFSIndexRepository
public Iterator<FSIndex<TOP>> getIndexes()
JFSIndexRepository
getIndexes
in interface JFSIndexRepository
public FSIndexRepository getFSIndexRepository()
JFSIndexRepository
getFSIndexRepository
in interface JFSIndexRepository
public <T extends TOP> FSIterator<T> getAllIndexedFS(Type aType)
JFSIndexRepository
Limitation: If there are no sorted or bag indexes defined for this type, but there is more than one set index defined, then this method will only return the contents of one of these set indexes (chosen arbitrarily). Generics: The returned Java cover class may not be a JCas one.
getAllIndexedFS
in interface JFSIndexRepository
T
- the Java Class corresponding to aTypeaType
- The typeaType
, in
no particular order.public <T extends TOP> FSIterator<T> getAllIndexedFS(int aType)
JFSIndexRepository
Limitation: If there are no sorted or bag indexes defined for this type, but there is more than one set index defined, then this method will only return the contents of one of these set indexes (chosen arbitrarily). Generics: The returned Java cover class may not be a JCas one.
getAllIndexedFS
in interface JFSIndexRepository
T
- the Java Class corresponding to aTypeaType
- The JCas unique type id obtained by doing MyJCasClass.typeaType
, in
no particular order.Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.