|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BaseCollectionReader
The Base CollectionReader
interface. Collection Readers should not implement this
interface directly. Instead they should implement
CollectionReader
or CasDataCollectionReader
. Most
UIMA developers will prefer to use the former.
A consuming CollectionReader
is one that removes each element from the
collection as it is read. To find out whether a CollectionReader
will consume
elements in this way, call the isConsuming()
method.
Users of a CollectionReader
should always close
it when they are
finished using it.
Field Summary |
---|
Fields inherited from interface org.apache.uima.resource.Resource |
---|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT |
Method Summary | |
---|---|
void |
close()
Closes this CollectionReader , after which it may no longer be used. |
ProcessingResourceMetaData |
getProcessingResourceMetaData()
Gets the metadata that describes this CasProcesor . |
Progress[] |
getProgress()
Gets information about the number of entities and/or amount of data that has been read from this CollectionReader , and the total amount that remains (if that information
is available). |
boolean |
hasNext()
Gets whether there are any elements remaining to be read from this CollectionReader . |
boolean |
isConsuming()
Gets whether this is a consuming CollectionReader . |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger |
Method Detail |
---|
boolean hasNext() throws IOException, CollectionException
CollectionReader
.
CollectionReader
.
IOException
- if an I/O failure occurs
CollectionException
- if there is some other problem with reading from the Collectionboolean isConsuming()
CollectionReader
. Consuming
CollectionReader
s remove each element from the Collection
as it
is read.
CollectionReader
Progress[] getProgress()
CollectionReader
, and the total amount that remains (if that information
is available).
This method returns an array of Progress
objects so that results can be reported
using different units. For example, the CollectionReader could report progress in terms of the
number of documents that have been read and also in terms of the number of bytes that have been
read. In many cases, it will be sufficient to return just one Progress
object.
Progress
objects. Each object may have different units (for
example number of entities or bytes).void close() throws IOException
CollectionReader
, after which it may no longer be used.
IOException
- if an I/O failure occursProcessingResourceMetaData getProcessingResourceMetaData()
CasProcesor
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |