org.apache.uima.jcas.impl
Class JFSIndexRepositoryImpl

java.lang.Object
  extended by org.apache.uima.jcas.impl.JFSIndexRepositoryImpl
All Implemented Interfaces:
JFSIndexRepository

public class JFSIndexRepositoryImpl
extends java.lang.Object
implements JFSIndexRepository


Method Summary
 FSIterator getAllIndexedFS(int aType)
          Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).
 FSIterator getAllIndexedFS(Type aType)
          Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).
 AnnotationIndex getAnnotationIndex()
          Get the standard annotation index.
 AnnotationIndex 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 getIndex(java.lang.String label)
          Retrieve an index according to a label.
 FSIndex getIndex(java.lang.String label, int type)
          Retrieve an index according to a label and a type.
 java.util.Iterator getIndexes()
          Get all indexes in this repository.
 java.util.Iterator getLabels()
          Get all labels for all indexes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIndex

public FSIndex getIndex(java.lang.String label)
Description copied from interface: JFSIndexRepository
Retrieve an index according to a label.

Specified by:
getIndex in interface JFSIndexRepository
Parameters:
label - The name of the index.
Returns:
The index with the name label, or null if no such index is defined.

getIndex

public FSIndex getIndex(java.lang.String label,
                        int type)
Description copied from interface: JFSIndexRepository
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.

Specified by:
getIndex in interface JFSIndexRepository
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

public AnnotationIndex getAnnotationIndex()
Description copied from interface: JFSIndexRepository
Get the standard annotation index.

Specified by:
getAnnotationIndex in interface JFSIndexRepository
Returns:
The standard annotation index.

getAnnotationIndex

public AnnotationIndex getAnnotationIndex(int type)
Description copied from interface: JFSIndexRepository
Get the standard annotation index restricted to a specific annotation type.

Specified by:
getAnnotationIndex in interface JFSIndexRepository
Parameters:
type - The annotation type the index is restricted to, written as Foo.type
Returns:
The standard annotation index, restricted to type.

getLabels

public java.util.Iterator getLabels()
Description copied from interface: JFSIndexRepository
Get all labels for all indexes.

Specified by:
getLabels in interface JFSIndexRepository
Returns:
All labels.

getIndexes

public java.util.Iterator getIndexes()
Description copied from interface: JFSIndexRepository
Get all indexes in this repository.

Specified by:
getIndexes in interface JFSIndexRepository
Returns:
All indexes.

getFSIndexRepository

public FSIndexRepository getFSIndexRepository()
Description copied from interface: JFSIndexRepository
Get the underlying FSIndexRepository associated with this JFSIndexRepository.

Specified by:
getFSIndexRepository in interface JFSIndexRepository
Returns:
The associated FSIndexRepository.

getAllIndexedFS

public FSIterator getAllIndexedFS(Type aType)
Description copied from interface: JFSIndexRepository
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).

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

getAllIndexedFS

public FSIterator getAllIndexedFS(int aType)
Description copied from interface: JFSIndexRepository
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).

Specified by:
getAllIndexedFS in interface JFSIndexRepository
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 © 2013. All Rights Reserved.