Interface BaseCollectionReader

    • Method Detail

      • hasNext

        boolean hasNext()
                 throws java.io.IOException,
                        CollectionException
        Gets whether there are any elements remaining to be read from this CollectionReader.
        Returns:
        true if and only if there are more elements available from this CollectionReader.
        Throws:
        java.io.IOException - if an I/O failure occurs
        CollectionException - if there is some other problem with reading from the Collection
      • isConsuming

        boolean isConsuming()
        Gets whether this is a consuming CollectionReader. Consuming CollectionReaders remove each element from the Collection as it is read.
        Returns:
        true if and only if this is a consuming CollectionReader
      • getProgress

        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).

        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.

        Returns:
        an array of Progress objects. Each object may have different units (for example number of entities or bytes).
      • close

        void close()
            throws java.io.IOException
        Closes this CollectionReader, after which it may no longer be used.
        Throws:
        java.io.IOException - if an I/O failure occurs
      • getProcessingResourceMetaData

        ProcessingResourceMetaData getProcessingResourceMetaData()
        Gets the metadata that describes this CasProcesor.
        Returns:
        an object containing all metadata for this CasProcessor