public class DocumentFilter extends BaseTransformationConnector
Modifier and Type | Class and Description |
---|---|
protected static class |
DocumentFilter.SpecPacker |
Modifier and Type | Field and Description |
---|---|
protected static String[] |
activitiesList |
protected static String |
ACTIVITY_FILTER |
_rcsid
currentContext, params
DOCUMENTSTATUS_ACCEPTED, DOCUMENTSTATUS_REJECTED
Constructor and Description |
---|
DocumentFilter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
addOrReplaceDocumentWithException(String documentURI,
VersionContext outputDescription,
RepositoryDocument document,
String authorityNameString,
IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector.
|
protected boolean |
checkDateIndexable(DocumentFilter.SpecPacker sp,
VersionContext outputDescription,
Date date,
IOutputCheckActivity activities) |
boolean |
checkDateIndexable(VersionContext outputDescription,
Date date,
IOutputCheckActivity activities)
Detect if a document date is acceptable or not.
|
protected boolean |
checkLengthIndexable(DocumentFilter.SpecPacker sp,
VersionContext outputDescription,
long length,
IOutputCheckActivity activities) |
boolean |
checkLengthIndexable(VersionContext outputDescription,
long length,
IOutputCheckActivity activities) |
protected boolean |
checkMimeTypeIndexable(DocumentFilter.SpecPacker sp,
VersionContext outputDescription,
String mimeType,
IOutputCheckActivity activities) |
boolean |
checkMimeTypeIndexable(VersionContext outputDescription,
String mimeType,
IOutputCheckActivity activities)
Detect if a mime type is indexable or not.
|
protected boolean |
checkURLIndexable(DocumentFilter.SpecPacker sp,
VersionContext outputDescription,
String url,
IOutputCheckActivity activities) |
boolean |
checkURLIndexable(VersionContext outputDescription,
String url,
IOutputCheckActivity activities) |
protected static void |
fillInContentsSpecificationMap(Map<String,Object> paramMap,
Specification os) |
protected static Set<String> |
fillSet(String input) |
String[] |
getActivitiesList()
Return a list of activities that this connector generates.
|
String |
getFormCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form check javascript method to call.
|
String |
getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form presave check javascript method to call.
|
VersionContext |
getPipelineDescription(Specification os)
Get an output version string, given an output specification.
|
void |
outputSpecificationBody(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber,
List<String> tabsArray)
Output the specification header section.
|
String |
processSpecificationPost(IPostParameters variableContext,
Locale locale,
Specification os,
int connectionSequenceNumber)
Process a specification post.
|
void |
viewSpecification(IHTTPOutput out,
Locale locale,
Specification os,
int connectionSequenceNumber)
View specification.
|
checkDocumentIndexable, requestInfo
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration, viewConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration
protected static final String ACTIVITY_FILTER
protected static final String[] activitiesList
public String[] getActivitiesList()
getActivitiesList
in interface ITransformationConnector
getActivitiesList
in class BaseTransformationConnector
public VersionContext getPipelineDescription(Specification os) throws ManifoldCFException, ServiceInterruption
getPipelineDescription
in interface IPipelineConnector
getPipelineDescription
in class BaseTransformationConnector
os
- is the current output specification for the job that is doing the crawling.ManifoldCFException
ServiceInterruption
public boolean checkDateIndexable(VersionContext outputDescription, Date date, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
checkDateIndexable
in interface IPipelineConnector
checkDateIndexable
in class BaseTransformationConnector
outputDescription
- is the document's output version.date
- is the date of the document.activities
- is an object including the activities that can be performed by this method.ManifoldCFException
ServiceInterruption
protected boolean checkDateIndexable(DocumentFilter.SpecPacker sp, VersionContext outputDescription, Date date, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
checkMimeTypeIndexable
in interface IPipelineConnector
checkMimeTypeIndexable
in class BaseTransformationConnector
outputDescription
- is the document's output version.mimeType
- is the mime type of the document.ManifoldCFException
ServiceInterruption
protected boolean checkMimeTypeIndexable(DocumentFilter.SpecPacker sp, VersionContext outputDescription, String mimeType, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
public boolean checkLengthIndexable(VersionContext outputDescription, long length, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
checkLengthIndexable
in interface IPipelineConnector
checkLengthIndexable
in class BaseTransformationConnector
ManifoldCFException
ServiceInterruption
protected boolean checkLengthIndexable(DocumentFilter.SpecPacker sp, VersionContext outputDescription, long length, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
public boolean checkURLIndexable(VersionContext outputDescription, String url, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
checkURLIndexable
in interface IPipelineConnector
checkURLIndexable
in class BaseTransformationConnector
ManifoldCFException
ServiceInterruption
protected boolean checkURLIndexable(DocumentFilter.SpecPacker sp, VersionContext outputDescription, String url, IOutputCheckActivity activities) throws ManifoldCFException, ServiceInterruption
public int addOrReplaceDocumentWithException(String documentURI, VersionContext outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException, ServiceInterruption, IOException
addOrReplaceDocumentWithException
in interface IPipelineConnector
addOrReplaceDocumentWithException
in class BaseTransformationConnector
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.outputDescription
- is 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 an output connector may use to perform operations, such as logging processing activity.ManifoldCFException
ServiceInterruption
IOException
protected static void fillInContentsSpecificationMap(Map<String,Object> paramMap, Specification os)
public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName
in interface IPipelineConnector
getFormCheckJavascriptMethodName
in class BaseTransformationConnector
connectionSequenceNumber
- is the unique number of this connection within the job.public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName
in interface IPipelineConnector
getFormPresaveCheckJavascriptMethodName
in class BaseTransformationConnector
connectionSequenceNumber
- is the unique number of this connection within the job.public void outputSpecificationHeader(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber, List<String> tabsArray) throws ManifoldCFException, IOException
outputSpecificationHeader
in interface IPipelineConnector
outputSpecificationHeader
in class BaseTransformationConnector
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
IOException
public void outputSpecificationBody(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException
outputSpecificationBody
in interface IPipelineConnector
outputSpecificationBody
in class BaseTransformationConnector
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
IOException
public String processSpecificationPost(IPostParameters variableContext, Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException
processSpecificationPost
in interface IPipelineConnector
processSpecificationPost
in class BaseTransformationConnector
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
public void viewSpecification(IHTTPOutput out, Locale locale, Specification os, int connectionSequenceNumber) throws ManifoldCFException, IOException
viewSpecification
in interface IPipelineConnector
viewSpecification
in class BaseTransformationConnector
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
IOException