Class MockFilterDocumentFactory

  • All Implemented Interfaces:
    com.funnelback.filter.api.FilterDocumentFactory

    public class MockFilterDocumentFactory
    extends Object
    implements com.funnelback.filter.api.FilterDocumentFactory
    A FilterDocumentFactory that can used in testing. The FilterDocumentFactory that is provided under Funnelback e.g. during a crawl is slightly different to this. The Funnelback provided one is both more efficient and capable of guessing the charset, if not already set on the FilterableDocument.
    • Constructor Detail

      • MockFilterDocumentFactory

        public MockFilterDocumentFactory()
    • Method Detail

      • toBytesDocument

        public com.funnelback.filter.api.documents.BytesDocument toBytesDocument​(com.funnelback.filter.api.documents.FilterableDocument filterableDocument)
        Specified by:
        toBytesDocument in interface com.funnelback.filter.api.FilterDocumentFactory
      • toStringDocument

        public Optional<com.funnelback.filter.api.documents.StringDocument> toStringDocument​(com.funnelback.filter.api.documents.FilterableDocument filterableDocument)
        Specified by:
        toStringDocument in interface com.funnelback.filter.api.FilterDocumentFactory
      • toStringDocument

        public com.funnelback.filter.api.documents.StringDocument toStringDocument​(com.funnelback.filter.api.documents.FilterableDocument filterableDocument,
                                                                                   com.funnelback.filter.api.DocumentType documentType,
                                                                                   String content)
        Specified by:
        toStringDocument in interface com.funnelback.filter.api.FilterDocumentFactory