This commit is contained in:
59
packages/java/dev/kreuzberg/UriKind.java
generated
Normal file
59
packages/java/dev/kreuzberg/UriKind.java
generated
Normal file
@@ -0,0 +1,59 @@
|
||||
// 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;
|
||||
|
||||
/**
|
||||
* Semantic classification of an extracted URI.
|
||||
*/
|
||||
public enum UriKind {
|
||||
/** A clickable hyperlink (web URL, file link). */
|
||||
Hyperlink("hyperlink"),
|
||||
/** An image or media resource reference. */
|
||||
Image("image"),
|
||||
/** An internal anchor or cross-reference target. */
|
||||
Anchor("anchor"),
|
||||
/** A citation or bibliographic reference (DOI, academic ref). */
|
||||
Citation("citation"),
|
||||
/**
|
||||
* A general reference (e.g. {@code \ref{}} in LaTeX, {@code :ref:} in RST).
|
||||
*/
|
||||
Reference("reference"),
|
||||
/** An email address ({@code mailto:} link or bare email). */
|
||||
Email("email");
|
||||
|
||||
/** The string value. */
|
||||
private final String value;
|
||||
|
||||
UriKind(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 UriKind fromValue(final String value) {
|
||||
for (UriKind 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