Interface ITransformationCheckActivity


  • public interface ITransformationCheckActivity
    This interface abstracts from the activities that a transformation connector can do when checking a document.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String _rcsid  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean checkDocumentIndexable​(java.io.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​(java.lang.String mimeType)
      Detect if a mime type is acceptable downstream or not.
      boolean checkURLIndexable​(java.lang.String url)
      Pre-determine whether a document's URL is acceptable downstream.
    • Method Detail

      • checkMimeTypeIndexable

        boolean checkMimeTypeIndexable​(java.lang.String mimeType)
                                throws ManifoldCFException,
                                       ServiceInterruption
        Detect if a mime type is acceptable downstream or not. This method is used to determine whether it makes sense to fetch a document in the first place.
        Parameters:
        mimeType - is the mime type of the document.
        Returns:
        true if the mime type can be accepted by the downstream connection.
        Throws:
        ManifoldCFException
        ServiceInterruption
      • checkDocumentIndexable

        boolean checkDocumentIndexable​(java.io.File localFile)
                                throws ManifoldCFException,
                                       ServiceInterruption
        Pre-determine whether a document (passed here as a File object) is acceptable downstream. This method is used to determine whether a document needs to be actually transferred. This hook is provided mainly to support search engines that only handle a small set of accepted file types.
        Parameters:
        localFile - is the local file to check.
        Returns:
        true if the file is acceptable by the downstream connection.
        Throws:
        ManifoldCFException
        ServiceInterruption
      • checkLengthIndexable

        boolean checkLengthIndexable​(long length)
                              throws ManifoldCFException,
                                     ServiceInterruption
        Pre-determine whether a document's length is acceptable downstream. This method is used to determine whether to fetch a document in the first place.
        Parameters:
        length - is the length of the document.
        Returns:
        true if the file is acceptable by the downstream connection.
        Throws:
        ManifoldCFException
        ServiceInterruption
      • checkURLIndexable

        boolean checkURLIndexable​(java.lang.String url)
                           throws ManifoldCFException,
                                  ServiceInterruption
        Pre-determine whether a document's URL is acceptable downstream. This method is used to help filter out documents that cannot be indexed in advance.
        Parameters:
        url - is the URL of the document.
        Returns:
        true if the file is acceptable by the downstream connection.
        Throws:
        ManifoldCFException
        ServiceInterruption