55 lines
1.6 KiB
Java
Generated
55 lines
1.6 KiB
Java
Generated
// 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;
|
|
|
|
/**
|
|
* Content rendering mode for code extraction.
|
|
*
|
|
* Controls how extracted code content is represented in the {@code content} field
|
|
* of {@code ExtractionResult}.
|
|
*/
|
|
public enum CodeContentMode {
|
|
/** Use TSLP semantic chunks as content (default). */
|
|
Chunks("chunks"),
|
|
/** Use raw source code as content. */
|
|
Raw("raw"),
|
|
/** Emit function/class headings + docstrings (no code bodies). */
|
|
Structure("structure");
|
|
|
|
/** The string value. */
|
|
private final String value;
|
|
|
|
CodeContentMode(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 CodeContentMode fromValue(final String value) {
|
|
for (CodeContentMode 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;
|
|
}
|
|
}
|