org.apache.uima.jcas
Interface JFSIndexRepository


public interface JFSIndexRepository

Provides the same function as the FSIndexRepository except that the variants that take a "type" argument take type arguments obtainable easily from the JCas type.


Method Summary
 FSIterator<TOP> getAllIndexedFS(int aType)
          Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).
 FSIterator<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.
 AnnotationIndex<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.
 FSIndex<TOP> getIndex(String label)
          Retrieve an index according to a label.
 FSIndex<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.
 

Method Detail

getIndex

FSIndex<TOP> getIndex(String label)
Retrieve an index according to a label.

Parameters:
label - The name of the index.
Returns:
The index with the name label, or null if no such index is defined.

getIndex

FSIndex<TOP> getIndex(String label,
                      int type)
Retrieve an index according to a label and a type. The type is used to narrow down the index of a more general type to a more specific one.

Parameters:
label - The name of the index
type - A subtype of the type of the index, written as Foo.type
Returns:
The specified index, or null if an index with that name doesn't exist, or it exists but type is not a subtype of the index's type.

getAnnotationIndex

AnnotationIndex<Annotation> getAnnotationIndex()
Get the standard annotation index.

Returns:
The standard annotation index.

getAnnotationIndex

AnnotationIndex<Annotation> getAnnotationIndex(int type)
Get the standard annotation index restricted to a specific annotation type.

Parameters:
type - The annotation type the index is restricted to, written as Foo.type
Returns:
The standard annotation index, restricted to type.

getLabels

Iterator<String> getLabels()
Get all labels for all indexes.

Returns:
All labels.

getIndexes

Iterator<FSIndex<TOP>> getIndexes()
Get all indexes in this repository.

Returns:
All indexes.

getFSIndexRepository

FSIndexRepository getFSIndexRepository()
Get the underlying FSIndexRepository associated with this JFSIndexRepository.

Returns:
The associated FSIndexRepository.

getAllIndexedFS

FSIterator<TOP> getAllIndexedFS(Type aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).

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).

Parameters:
aType - The type
Returns:
An iterator that returns all indexed FeatureStructures of type aType, in no particular order.

getAllIndexedFS

FSIterator<TOP> getAllIndexedFS(int aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).

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).

Parameters:
aType - The type obtained by doing MyJCasClass.type
Returns:
An iterator that returns all indexed FeatureStructures of type aType, in no particular order.


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.