Class TextLoader

java.lang.Object
org.springframework.ai.loader.impl.TextLoader
All Implemented Interfaces:
Loader

public class TextLoader extends Object implements Loader
Author:
Craig Walls, Christian Tzolov
  • Field Details

  • Constructor Details

    • TextLoader

      public TextLoader(String resourceUrl)
    • TextLoader

      public TextLoader(org.springframework.core.io.Resource resource)
  • Method Details

    • setCharset

      public void setCharset(Charset charset)
    • getCharset

      public Charset getCharset()
    • getCustomMetadata

      public Map<String,Object> getCustomMetadata()
      Metadata associated with all documents created by the loader.
      Returns:
      Metadata to be assigned to the output Documents.
    • load

      public List<Document> load()
      Specified by:
      load in interface Loader
    • load

      public List<Document> load(TextSplitter textSplitter)
      Specified by:
      load in interface Loader