org.apache.manifoldcf.crawler.system
Class QueuedDocumentSet

java.lang.Object
  extended by org.apache.manifoldcf.crawler.system.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 Summary
static java.lang.String _rcsid
           
protected  IRepositoryConnection connection
          The connection description that applies to this document set.
protected  QueuedDocument[] documents
          This is the array of QueuedDocument objects.
protected  IJobDescription jobDescription
          The job description that applies to this document set.
 
Constructor Summary
QueuedDocumentSet(java.util.ArrayList documents, IJobDescription jobDescription, IRepositoryConnection connection)
          Constructor.
 
Method Summary
 void beginProcessing(QueueTracker queueTracker)
          Log that we are beginning the processing of a set of documents
 double calculateAssignmentRating(QueueTracker overlapCalculator)
          Calculate a rating for this set.
 void endProcessing(QueueTracker queueTracker)
          Log that we are done processing a set of documents
 IRepositoryConnection getConnection()
          Get the connection.
 int getCount()
          Get the number of documents.
 QueuedDocument getDocument(int index)
          Get the nth document.
 IJobDescription getJobDescription()
          Get the job description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

documents

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


jobDescription

protected 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 IRepositoryConnection connection
The connection description that applies to this document set.

Constructor Detail

QueuedDocumentSet

public QueuedDocumentSet(java.util.ArrayList 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.