Enum Class TableFormat

java.lang.Object
java.lang.Enum<TableFormat>
io.agentscope.core.rag.reader.TableFormat
All Implemented Interfaces:
Serializable, Comparable<TableFormat>, Constable

public enum TableFormat extends Enum<TableFormat>
Enumeration of table formatting options for Word document readers.

This enum defines how tables should be converted to text format when extracting content from Word documents.

  • Enum Constant Details

    • MARKDOWN

      public static final TableFormat MARKDOWN
      Convert tables to Markdown format.

      Example:

       | Header1 | Header2 |
       |---------|---------|
       | Cell1   | Cell2   |
       

      Line breaks within table cells are rendered as <br> so each table row remains on one line of Markdown.

    • JSON

      public static final TableFormat JSON
      Convert tables to JSON format.

      Extracts the table as a JSON string representing a list of rows, where each row is a list of cell values. This format handles cells with newlines correctly.

      Example:

       <system-info>A table loaded as a JSON array:</system-info>
       ["Header1", "Header2"]
       ["Cell1", "Cell2"]
       
  • Method Details

    • values

      public static TableFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TableFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null