Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

uima::ANIndex Class Reference

Inherits uima::FSIndex.

List of all members.


Detailed Description

This class represents a single index over feature structures of type annotation.

See also:
AnnotationFS

ANIterator


Public Member Functions

 ANIndex ()
 Default constructor.
 ANIndex (FSIndex const &)
 Upgrade/Conversion constructor from a standard index.
ANIterator iterator () const
 create an iterator over all the feature structures in this index.
ANIterator filteredIterator (FSFilter const *cpFilter) const
 create an iterator over this index with the filter cpFilter,
ANIterator subIterator (AnnotationFS const &an, EnIteratorAmbiguity enAmbiguous=enAmbiguous) const
 create an iterator over this index only returning Annotations with begin position >= an.BeginPos and begin positon < an.EndPos
ANIterator unambiguousIterator () const
 create an iterator over this index such that calling moveToNext/moveToPrevious will alway move the resulting iterator to an annotation that is no longer covered by the current annotation.
bool isValid () const
size_t getSize () const
 get the number of feature structures currently in this index.
FeatureStructure find (FeatureStructure const &anFS) const
 find the feature structure in this index which is equivalent to anFS according to the comparator for this index.
FSIterator typeSetIterator (std::set< uima::Type > const &crTypes) const
 create an iterator over all the feature structures in this index with one of the specified types.

Protected Member Functions

void checkValidity () const

Protected Attributes

lowlevel::IndexABase const * iv_pIndex
uima::lowlevel::IndexRepository * iv_indexRepository


Constructor & Destructor Documentation

uima::ANIndex::ANIndex  )  [inline]
 

Default constructor.

Creates an invalid ANIndex object.

uima::ANIndex::ANIndex FSIndex const &   )  [inline, explicit]
 

Upgrade/Conversion constructor from a standard index.


Member Function Documentation

ANIterator uima::ANIndex::iterator  )  const [inline]
 

create an iterator over all the feature structures in this index.

Exceptions:
InvalidIndexObjectException 

Reimplemented from uima::FSIndex.

ANIterator uima::ANIndex::filteredIterator FSFilter const *  cpFilter  )  const [inline]
 

create an iterator over this index with the filter cpFilter,

See also:
FSFilter
Exceptions:
InvalidIndexObjectException 

Reimplemented from uima::FSIndex.

ANIterator uima::ANIndex::subIterator AnnotationFS const &  an,
EnIteratorAmbiguity  enAmbiguous = enAmbiguous
const
 

create an iterator over this index only returning Annotations with begin position >= an.BeginPos and begin positon < an.EndPos

Parameters:
an The annotatation "under" which the subiterator iterates
enAmbiguous If set to CAS::enAmbiguous calling moveToNext/moveToPrevious will alway move the resulting interator to an annotation that is no longer covered by the current annotation. This means that: moveToNext will always return an annotation with a begin position > than the current end position. moveToPrevious will always return an annotation with a end position < than the current begin position. In a situation like this:
|--------- Name1 ------||-------- Name2 -------|
|-- Tok1 --||-- Tok2 --||-- Tok3 --||-- Tok4 --|
A normal iterator starting out with Name1 would return: Name1, Tok1, Tok2, Name2, Tok3, Tok4 A unambibous iterator starting out with Name1 would return: Name1, Name2 (This assumes that the types Name and Tok are subsumed by the type for this index and no other subusumed annotations cover the area.)
Exceptions:
InvalidIndexObjectException 

ANIterator uima::ANIndex::unambiguousIterator  )  const
 

create an iterator over this index such that calling moveToNext/moveToPrevious will alway move the resulting iterator to an annotation that is no longer covered by the current annotation.

This means that: moveToNext will always return an annotation with a begin position > than the current end position. moveToPrevious will always return an annotation with a end position < than the current begin position. In a situation like this:
|--------- Name1 ------||-------- Name2 -------|
|-- Tok1 --||-- Tok2 --||-- Tok3 --||-- Tok4 --|
A normal iterator starting out with Name1 would return: Name1, Tok1, Tok2, Name2, Tok3, Tok4 A unambibous iterator starting out with Name1 would return: Name1, Name2 (This assumes that the types Name and Tok are subsumed by the type for this index and no other subusumed annotations cover the area.)

Exceptions:
InvalidIndexObjectException 

void uima::FSIndex::checkValidity  )  const [protected, inherited]
 

bool uima::FSIndex::isValid  )  const [inherited]
 

Returns:
true if this index object is valid.

size_t uima::FSIndex::getSize  )  const [inherited]
 

get the number of feature structures currently in this index.

Exceptions:
InvalidIndexObjectException 

FeatureStructure uima::FSIndex::find FeatureStructure const &  anFS  )  const [inherited]
 

find the feature structure in this index which is equivalent to anFS according to the comparator for this index.

If such an FS cannot be found an invalid feature structure is returned.

Exceptions:
InvalidIndexObjectException 

FSIterator uima::FSIndex::typeSetIterator std::set< uima::Type > const &  crTypes  )  const [inherited]
 

create an iterator over all the feature structures in this index with one of the specified types.

Exceptions:
InvalidIndexObjectException 
InvalidFSTypeObjectException 
IncompatibleTypeForIndexException 


Member Data Documentation

lowlevel::IndexABase const* uima::FSIndex::iv_pIndex [protected, inherited]
 

uima::lowlevel::IndexRepository* uima::FSIndex::iv_indexRepository [protected, inherited]
 


The documentation for this class was generated from the following file:
Generated on Mon Oct 1 16:04:13 2012 for UIMACPP API by  doxygen 1.3.9.1