Class QueuedDocumentSet


  • public class QueuedDocumentSet
    extends java.lang.Object
    This class is what's actually queued. It is immutable and it represents an array or set of QueuedDocument objects, all of which will be processed by a single worker thread in bulk.
    • Field Detail

      • documents

        protected final QueuedDocument[] documents
        This is the array of QueuedDocument objects.
      • jobDescription

        protected final IJobDescription jobDescription
        The job description that applies to this document set. There is no guarantee that this won't change before we get around to processing the document; therefore any job-based metadata changes will also need to go through the queue mechanism.
      • connection

        protected final IRepositoryConnection connection
        The connection description that applies to this document set.
    • Constructor Detail

      • QueuedDocumentSet

        public QueuedDocumentSet​(java.util.List<QueuedDocument> documents,
                                 IJobDescription jobDescription,
                                 IRepositoryConnection connection)
        Constructor.
        Parameters:
        documents - is the arraylist representing the documents accumulated for a single connection.
    • Method Detail

      • getCount

        public int getCount()
        Get the number of documents.
        Returns:
        the number.
      • getDocument

        public QueuedDocument getDocument​(int index)
        Get the nth document.
        Parameters:
        index - is the document number.
        Returns:
        the document.
      • beginProcessing

        public void beginProcessing​(QueueTracker queueTracker)
        Log that we are beginning the processing of a set of documents
      • endProcessing

        public void endProcessing​(QueueTracker queueTracker)
        Log that we are done processing a set of documents
      • calculateAssignmentRating

        public double calculateAssignmentRating​(QueueTracker overlapCalculator)
        Calculate a rating for this set.
        Parameters:
        overlapCalculator - is the calculator object.
        Returns:
        the rating.
      • getJobDescription

        public IJobDescription getJobDescription()
        Get the job description.
        Returns:
        the job description.
      • getConnection

        public IRepositoryConnection getConnection()
        Get the connection.
        Returns:
        the connection.