protected static class IncrementalIngester.MonitoredAddActivityWrapper extends Object implements IOutputAddActivity
| Modifier and Type | Field and Description |
|---|---|
protected IOutputAddActivity |
activities |
protected boolean |
documentProcessed |
_rcsidCREATED_DIRECTORY, EXCEPTION, EXCLUDED_CONTENT, EXCLUDED_DATE, EXCLUDED_LENGTH, EXCLUDED_MIMETYPE, EXCLUDED_URL, HTTP_ERROR, IOEXCEPTION, UNKNOWN_SECURITY| Constructor and Description |
|---|
IncrementalIngester.MonitoredAddActivityWrapper(IOutputAddActivity activities) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDateIndexable(Date date)
Detect if a date is acceptable downstream or not.
|
boolean |
checkDocumentIndexable(File localFile)
Pre-determine whether a document (passed here as a File object) is acceptable downstream.
|
boolean |
checkLengthIndexable(long length)
Pre-determine whether a document's length is acceptable downstream.
|
boolean |
checkMimeTypeIndexable(String mimeType)
Detect if a mime type is acceptable downstream or not.
|
boolean |
checkURLIndexable(String url)
Pre-determine whether a document's URL is acceptable downstream.
|
void |
noDocument()
Send NO document via the pipeline to the next output connection.
|
String |
qualifyAccessToken(String authorityNameString,
String accessToken)
Qualify an access token appropriately, to match access tokens as returned by mod_aa.
|
void |
recordActivity(Long startTime,
String activityType,
Long dataSize,
String entityURI,
String resultCode,
String resultDescription)
Record time-stamped information about the activity of the output connector.
|
int |
sendDocument(String documentURI,
RepositoryDocument document)
Send a document via the pipeline to the next output connection.
|
boolean |
wasDocumentActedUpon() |
protected final IOutputAddActivity activities
protected boolean documentProcessed
public IncrementalIngester.MonitoredAddActivityWrapper(IOutputAddActivity activities)
public boolean wasDocumentActedUpon()
public int sendDocument(String documentURI, RepositoryDocument document) throws ManifoldCFException, ServiceInterruption, IOException
sendDocument in interface IOutputAddActivitydocumentURI - is the document's URI.document - is the document data to be processed (handed to the output data store).IOException - only if there's an IO error reading the data from the document.ManifoldCFExceptionServiceInterruptionpublic void noDocument()
throws ManifoldCFException,
ServiceInterruption
noDocument in interface IOutputAddActivityManifoldCFExceptionServiceInterruptionpublic String qualifyAccessToken(String authorityNameString, String accessToken) throws ManifoldCFException
qualifyAccessToken in interface IOutputQualifyActivityauthorityNameString - is the name of the authority to use to qualify the access token.accessToken - is the raw, repository access token.ManifoldCFExceptionpublic void recordActivity(Long startTime, String activityType, Long dataSize, String entityURI, String resultCode, String resultDescription) throws ManifoldCFException
recordActivity in interface IOutputHistoryActivitystartTime - is either null or the time since the start of epoch in milliseconds (Jan 1, 1970). Every
activity has an associated time; the startTime field records when the activity began. A null value
indicates that the start time and the finishing time are the same.activityType - is a string which is fully interpretable only in the context of the connector involved, which is
used to categorize what kind of activity is being recorded. For example, a web connector might record a
"fetch document" activity. Cannot be null.dataSize - is the number of bytes of data involved in the activity, or null if not applicable.entityURI - is a (possibly long) string which identifies the object involved in the history record.
The interpretation of this field will differ from connector to connector. May be null.resultCode - contains a terse description of the result of the activity. The description is limited in
size to 255 characters, and can be interpreted only in the context of the current connector. May be null.resultDescription - is a (possibly long) human-readable string which adds detail, if required, to the result
described in the resultCode field. This field is not meant to be queried on. May be null.ManifoldCFExceptionpublic boolean checkDateIndexable(Date date) throws ManifoldCFException, ServiceInterruption
checkDateIndexable in interface IOutputCheckActivitydate - is the date of the document.ManifoldCFExceptionServiceInterruptionpublic boolean checkMimeTypeIndexable(String mimeType) throws ManifoldCFException, ServiceInterruption
checkMimeTypeIndexable in interface IOutputCheckActivitymimeType - is the mime type of the document.ManifoldCFExceptionServiceInterruptionpublic boolean checkDocumentIndexable(File localFile) throws ManifoldCFException, ServiceInterruption
checkDocumentIndexable in interface IOutputCheckActivitylocalFile - is the local file to check.ManifoldCFExceptionServiceInterruptionpublic boolean checkLengthIndexable(long length)
throws ManifoldCFException,
ServiceInterruption
checkLengthIndexable in interface IOutputCheckActivitylength - is the length of the document.ManifoldCFExceptionServiceInterruptionpublic boolean checkURLIndexable(String url) throws ManifoldCFException, ServiceInterruption
checkURLIndexable in interface IOutputCheckActivityurl - is the URL of the document.ManifoldCFExceptionServiceInterruption