This commit is contained in:
65
packages/java/dev/kreuzberg/OutputFormat.java
generated
Normal file
65
packages/java/dev/kreuzberg/OutputFormat.java
generated
Normal file
@@ -0,0 +1,65 @@
|
||||
// This file is auto-generated by alef — DO NOT EDIT.
|
||||
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
||||
// To regenerate: alef generate
|
||||
// To verify freshness: alef verify --exit-code
|
||||
// Issues & docs: https://github.com/kreuzberg-dev/alef
|
||||
package dev.kreuzberg;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* Output format for extraction results.
|
||||
*
|
||||
* Controls the format of the {@code content} field in {@code ExtractionResult}.
|
||||
* When set to {@code Markdown}, {@code Djot}, or {@code Html}, the output uses that format.
|
||||
* {@code Plain} returns the raw extracted text.
|
||||
* {@code Structured} returns JSON with full OCR element data including bounding
|
||||
* boxes and confidence scores.
|
||||
*/
|
||||
public enum OutputFormat {
|
||||
/** Plain text content only (default) */
|
||||
Plain("plain"),
|
||||
/** Markdown format */
|
||||
Markdown("markdown"),
|
||||
/** Djot markup format */
|
||||
Djot("djot"),
|
||||
/** HTML format */
|
||||
Html("html"),
|
||||
/** JSON tree format with heading-driven sections. */
|
||||
Json("json"),
|
||||
/** Structured JSON format with full OCR element metadata. */
|
||||
Structured("structured"),
|
||||
/** Custom renderer registered via the RendererRegistry. */
|
||||
Custom("custom");
|
||||
|
||||
/** The string value. */
|
||||
private final String value;
|
||||
|
||||
OutputFormat(final String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/** Returns the string value. */
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/** Creates an instance from a string value. */
|
||||
@JsonCreator
|
||||
public static OutputFormat fromValue(final String value) {
|
||||
for (OutputFormat e : values()) {
|
||||
if (e.value.equalsIgnoreCase(value)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown value: " + value);
|
||||
}
|
||||
|
||||
/** Returns the wire-format string value (matches JSON serialization). */
|
||||
@Override
|
||||
public String toString() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user