Package io.agentscope.core.rag.reader
Enum Class TableFormat
- All Implemented Interfaces:
Serializable,Comparable<TableFormat>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic TableFormatReturns the enum constant of this class with the specified name.static TableFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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 nameNullPointerException- if the argument is null
-