Class QueuedDocument
- java.lang.Object
-
- org.apache.manifoldcf.crawler.system.QueuedDocument
-
public class QueuedDocument extends java.lang.Object
This class represents a document that will be placed on the document queue, and will be processed by a worker thread. The reason that DocumentDescription by itself is not used has to do with the fact that a good deal more information about the document must be obtained in order to find the last version ingested (which must be done in bulk, for performance reasons). Since we are finding everything anyway, it makes sense to put what we have in a structure so that the worker threads don't need to repeat what the stuffer thread did.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected java.lang.String[]
binNames
The binnames for the document, according to the connectorprotected DocumentDescription
documentDescription
The document description.protected java.util.Map<java.lang.String,DocumentIngestStatusSet>
lastIngestedStatus
The last ingested status, null meaning "never ingested".protected boolean
wasProcessed
This flag indicates whether the document has been processed or not.
-
Constructor Summary
Constructors Constructor Description QueuedDocument(DocumentDescription documentDescription, java.util.Map<java.lang.String,DocumentIngestStatusSet> lastIngestedStatus, java.lang.String[] binNames)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
anyLastIngestedRecords()
Return true if there are *any* last ingested records.java.lang.String[]
getBinNames()
Get the bin names for this documentDocumentDescription
getDocumentDescription()
Get the document description.DocumentIngestStatusSet
getLastIngestedStatus(java.lang.String outputConnectionName)
Get the last ingested status.void
setProcessed()
Note that the document was processed in some way.boolean
wasProcessed()
Check if document has been processed yet.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
documentDescription
protected final DocumentDescription documentDescription
The document description.
-
lastIngestedStatus
protected final java.util.Map<java.lang.String,DocumentIngestStatusSet> lastIngestedStatus
The last ingested status, null meaning "never ingested".
-
binNames
protected final java.lang.String[] binNames
The binnames for the document, according to the connector
-
wasProcessed
protected boolean wasProcessed
This flag indicates whether the document has been processed or not.
-
-
Constructor Detail
-
QueuedDocument
public QueuedDocument(DocumentDescription documentDescription, java.util.Map<java.lang.String,DocumentIngestStatusSet> lastIngestedStatus, java.lang.String[] binNames)
Constructor.- Parameters:
documentDescription
- is the document description.lastIngestedStatus
- is the document's last ingested status.binNames
- are the bins associated with the document.
-
-
Method Detail
-
getDocumentDescription
public DocumentDescription getDocumentDescription()
Get the document description.- Returns:
- the document description.
-
getLastIngestedStatus
public DocumentIngestStatusSet getLastIngestedStatus(java.lang.String outputConnectionName)
Get the last ingested status.- Parameters:
outputConnectionName
- is the name of the output connection.- Returns:
- the last ingested status for that output, or null if not found.
-
anyLastIngestedRecords
public boolean anyLastIngestedRecords()
Return true if there are *any* last ingested records.- Returns:
- true if any last ingested records exist.
-
getBinNames
public java.lang.String[] getBinNames()
Get the bin names for this document
-
wasProcessed
public boolean wasProcessed()
Check if document has been processed yet.- Returns:
- true if processed, false if not.
-
setProcessed
public void setProcessed()
Note that the document was processed in some way.
-
-