Interface DocumentTransformer

  • All Implemented Interfaces:

    
    public interface DocumentTransformer
    
                        

    Defines the interface for transforming a Document. Implementations can perform a variety of tasks such as transforming, filtering, enriching, etc.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Document transform(Document document) Transforms a provided document.
      List<Document> transformAll(List<Document> documents) Transforms all the provided documents.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • transform

         abstract Document transform(Document document)

        Transforms a provided document.

        Parameters:
        document - The document to be transformed.
        Returns:

        The transformed document, or null if the document should be filtered out.

      • transformAll

         List<Document> transformAll(List<Document> documents)

        Transforms all the provided documents.

        Parameters:
        documents - A list of documents to be transformed.
        Returns:

        A list of transformed documents. The length of this list may be shorter or longer than the original list. Returns an empty list if all documents were filtered out.