Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.uima.collection.base_cpm
Interface CasDataCollectionReader

All Superinterfaces:
  BaseCollectionReader

All Known Implementing Classes:
  CasDataCollectionReader_ImplBase

    public interface CasDataCollectionReader

extends BaseCollectionReader

A `CasDataCollectionReader` is used to iterate over the elements of a Collection. Iteration is done using the `BaseCollectionReader.hasNext()` and `getNext()` methods. Each element of the collection is returned as a `CasData`.

Method Summary
`CasDataInitializer` | `getCasDataInitializer()` Deprecated. As of v2.0 CAS Initializers are deprecated.
`CasData` | `getNext()` Gets the next `CasData` from this `CollectionReader`.
`CasData[]` | `getNext(int aNumToGet)` Gets multiple `CasData` objects from this `CasDataCollectionReader`.
`void` | `setCasInitializer(CasDataInitializer aCasDataInitializer)` Deprecated. As of v2.0 CAS Initializers are deprecated.

Methods inherited from interface org.apache.uima.collection.base_cpm.BaseCollectionReader
`close, getProcessingResourceMetaData, getProgress, hasNext, isConsuming`

Method Detail

### getNext

    CasData getNext()
                    throws IOException,
                           CollectionException

  Gets the next `CasData` from this `CollectionReader`. If this is a consuming Collection Reader (see `BaseCollectionReader.isConsuming()`), this element will also be removed from the collection.

  Returns:
    the next `Entity`
  Throws:
    `UIMA_IllegalStateException` - if there are no more elements left in the collection
    `IOException` - if an I/O failure occurs
    `CollectionException` - if there is some other problem with reading from the Collection

### getNext

    CasData[] getNext(int aNumToGet)
                      throws IOException,
                             CollectionException

  Gets multiple `CasData` objects from this `CasDataCollectionReader`. If this is a consuming Collection Reader (see `BaseCollectionReader.isConsuming()`), these entities will also be removed from the collection.

  Parameters:
    `aNumToGet` - the number of `CasData` objects to get
  Returns:
    an array containing the `CasData` objects. The length of this array will be at most `aNumToGet`, although it may be less (if there are not enough elements left in the collection).
  Throws:
    `UIMA_IllegalStateException` - if there is no more elements in the collection
    `IOException` - if an I/O failure occurs
    `CollectionException` - if there is some other problem with reading from the Collection

### getCasDataInitializer

    CasDataInitializer getCasDataInitializer()

  Deprecated. As of v2.0 CAS Initializers are deprecated.

  Gets the CAS Data Initializer that has been assigned to this Collection Reader. Note that CollectionReader implementations are not required to make use of the CAS Initializer - refer to the documentation for your specific Collection Reader.

  Returns:
    the CAS Data Initializer for this Collection Reader

### setCasInitializer

    void setCasInitializer(CasDataInitializer aCasDataInitializer)

  Deprecated. As of v2.0 CAS Initializers are deprecated.

  Assigns a CAS Data Initializer for this Collection Reader to use. Note that* CollectionReader implementations are not required to make use of the CAS Initializer - refer to the documentation for your specific Collection Reader.

  Parameters:
    `aCasDataInitializer` - the CAS Data Initializer for this Collection Reader

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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