Interface CasDataCollectionReader
-
- All Superinterfaces:
BaseCollectionReader
,Resource
- All Known Implementing Classes:
CasDataCollectionReader_ImplBase
public interface CasDataCollectionReader extends BaseCollectionReader
ACasDataCollectionReader
is used to iterate over the elements of a Collection. Iteration is done using theBaseCollectionReader.hasNext()
andgetNext()
methods. Each element of the collection is returned as aCasData
.
-
-
Field Summary
-
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CasDataInitializer
getCasDataInitializer()
Deprecated.As of v2.0 CAS Initializers are deprecated.CasData
getNext()
Gets the nextCasData
from thisCollectionReader
.CasData[]
getNext(int aNumToGet)
Gets multipleCasData
objects from thisCasDataCollectionReader
.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
-
Methods inherited from interface org.apache.uima.resource.Resource
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
-
-
-
-
Method Detail
-
getNext
CasData getNext() throws IOException, CollectionException
Gets the nextCasData
from thisCollectionReader
. If this is a consuming Collection Reader (seeBaseCollectionReader.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 collectionIOException
- if an I/O failure occursCollectionException
- if there is some other problem with reading from the Collection
-
getNext
CasData[] getNext(int aNumToGet) throws IOException, CollectionException
Gets multipleCasData
objects from thisCasDataCollectionReader
. If this is a consuming Collection Reader (seeBaseCollectionReader.isConsuming()
), these entities will also be removed from the collection.- Parameters:
aNumToGet
- the number ofCasData
objects to get- Returns:
- an array containing the
CasData
objects. The length of this array will be at mostaNumToGet
, 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 collectionIOException
- if an I/O failure occursCollectionException
- if there is some other problem with reading from the Collection
-
getCasDataInitializer
@Deprecated 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
@Deprecated 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
-
-