public interface IPipelineConnector extends IConnector
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
static int |
DOCUMENTSTATUS_ACCEPTED
Document accepted
|
static int |
DOCUMENTSTATUS_REJECTED
Document permanently rejected
|
Modifier and Type | Method and Description |
---|---|
int |
addOrReplaceDocumentWithException(java.lang.String documentURI,
VersionContext pipelineDescription,
RepositoryDocument document,
java.lang.String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
boolean |
checkDateIndexable(VersionContext pipelineDescription,
java.util.Date date,
IOutputCheckActivity checkActivity)
Detect if a document date is acceptable or not.
|
boolean |
checkDocumentIndexable(VersionContext pipelineDescription,
java.io.File localFile,
IOutputCheckActivity checkActivity)
Pre-determine whether a document (passed here as a File object) is acceptable or not.
|
boolean |
checkLengthIndexable(VersionContext pipelineDescription,
long length,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's length is acceptable.
|
boolean |
checkMimeTypeIndexable(VersionContext pipelineDescription,
java.lang.String mimeType,
IOutputCheckActivity checkActivity)
Detect if a mime type is acceptable or not.
|
boolean |
checkURLIndexable(VersionContext pipelineDescription,
java.lang.String url,
IOutputCheckActivity checkActivity)
Pre-determine whether a document's URL is acceptable.
|
java.lang.String |
getFormCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form check javascript method to call.
|
java.lang.String |
getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form presave check javascript method to call.
|
VersionContext |
getPipelineDescription(Specification spec)
Get a pipeline version object, given a pipeline specification object.
|
void |
outputSpecificationBody(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
java.lang.String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber,
java.util.List<java.lang.String> tabsArray)
Output the specification header section.
|
java.lang.String |
processSpecificationPost(IPostParameters variableContext,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber)
Process a specification post.
|
void |
viewSpecification(IHTTPOutput out,
java.util.Locale locale,
Specification os,
int connectionSequenceNumber)
View specification.
|
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration
static final java.lang.String _rcsid
static final int DOCUMENTSTATUS_ACCEPTED
static final int DOCUMENTSTATUS_REJECTED
VersionContext getPipelineDescription(Specification spec) throws ManifoldCFException, ServiceInterruption
spec
- is the current pipeline specification object for this connection for the job that is doing the crawling.ManifoldCFException
ServiceInterruption
boolean checkDateIndexable(VersionContext pipelineDescription, java.util.Date date, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
pipelineDescription
- is the document's pipeline version string, for this connection.date
- is the date of the document.checkActivity
- is an object including the activities that can be performed by this method.ManifoldCFException
ServiceInterruption
boolean checkMimeTypeIndexable(VersionContext pipelineDescription, java.lang.String mimeType, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
pipelineDescription
- is the document's pipeline version string, for this connection.mimeType
- is the mime type of the document.checkActivity
- is an object including the activities that can be performed by this method.ManifoldCFException
ServiceInterruption
boolean checkDocumentIndexable(VersionContext pipelineDescription, java.io.File localFile, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
pipelineDescription
- is the document's pipeline version string, for this connection.localFile
- is the local file to check.checkActivity
- is an object including the activities that can be done by this method.ManifoldCFException
ServiceInterruption
boolean checkLengthIndexable(VersionContext pipelineDescription, long length, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
pipelineDescription
- is the document's pipeline version string, for this connection.length
- is the length of the document.checkActivity
- is an object including the activities that can be done by this method.ManifoldCFException
ServiceInterruption
boolean checkURLIndexable(VersionContext pipelineDescription, java.lang.String url, IOutputCheckActivity checkActivity) throws ManifoldCFException, ServiceInterruption
pipelineDescription
- is the document's pipeline version string, for this connection.url
- is the URL of the document.checkActivity
- is an object including the activities that can be done by this method.ManifoldCFException
ServiceInterruption
int addOrReplaceDocumentWithException(java.lang.String documentURI, VersionContext pipelineDescription, RepositoryDocument document, java.lang.String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException, ServiceInterruption, java.io.IOException
documentURI
- is the URI of the document. The URI is presumed to be the unique identifier which the output data store will use to process
and serve the document. This URI is constructed by the repository connector which fetches the document, and is thus universal across all output connectors.pipelineDescription
- includes the description string that was constructed for this document by the getOutputDescription() method.document
- is the document data to be processed (handed to the output data store).authorityNameString
- is the name of the authority responsible for authorizing any access tokens passed in with the repository document. May be null.activities
- is the handle to an object that the implementer of a pipeline connector may use to perform operations, such as logging processing activity,
or sending a modified document to the next stage in the pipeline.java.io.IOException
- only if there's a stream error reading the document data.ManifoldCFException
ServiceInterruption
java.lang.String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
connectionSequenceNumber
- is the unique number of this connection within the job.java.lang.String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
connectionSequenceNumber
- is the unique number of this connection within the job.void outputSpecificationHeader(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber, java.util.List<java.lang.String> tabsArray) throws ManifoldCFException, java.io.IOException
out
- is the output to which any HTML should be sent.locale
- is the preferred local of the output.os
- is the current pipeline specification for this connection.connectionSequenceNumber
- is the unique number of this connection within the job.tabsArray
- is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFException
java.io.IOException
void outputSpecificationBody(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber, int actualSequenceNumber, java.lang.String tabName) throws ManifoldCFException, java.io.IOException
out
- is the output to which any HTML should be sent.locale
- is the preferred local of the output.os
- is the current pipeline specification for this job.connectionSequenceNumber
- is the unique number of this connection within the job.actualSequenceNumber
- is the connection within the job that has currently been selected.tabName
- is the current tab name.ManifoldCFException
java.io.IOException
java.lang.String processSpecificationPost(IPostParameters variableContext, java.util.Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException
variableContext
- contains the post data, including binary file-upload information.locale
- is the preferred local of the output.os
- is the current pipeline specification for this job.connectionSequenceNumber
- is the unique number of this connection within the job.ManifoldCFException
void viewSpecification(IHTTPOutput out, java.util.Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException, java.io.IOException
out
- is the output to which any HTML should be sent.locale
- is the preferred local of the output.connectionSequenceNumber
- is the unique number of this connection within the job.os
- is the current pipeline specification for this job.ManifoldCFException
java.io.IOException