This commit is contained in:
17
docs/snippets/java/plugins/plugin_extractor.md
Normal file
17
docs/snippets/java/plugins/plugin_extractor.md
Normal file
@@ -0,0 +1,17 @@
|
||||
<!-- snippet:skip reason="The Java binding generates IDocumentExtractor + DocumentExtractorBridge but the InternalDocument Java class referenced by the interface is not generated by the alef Java backend. Custom DocumentExtractor implementations cannot construct return values until the alef-generated Panama type for InternalDocument lands." -->
|
||||
```java title="Java"
|
||||
import dev.kreuzberg.IDocumentExtractor;
|
||||
import dev.kreuzberg.DocumentExtractorBridge;
|
||||
|
||||
// Java's Panama FFM binding exposes the IDocumentExtractor interface and the
|
||||
// DocumentExtractorBridge.registerDocumentExtractor / unregisterDocumentExtractor
|
||||
// helpers, but the InternalDocument return type is referenced from the
|
||||
// interface signature without a corresponding generated Java class. Until the
|
||||
// alef Java backend emits dev.kreuzberg.InternalDocument, custom Java
|
||||
// DocumentExtractor implementations cannot return a value from extract_bytes /
|
||||
// extract_file.
|
||||
//
|
||||
// Implement the extractor in Rust as `Plugin + DocumentExtractor` and register
|
||||
// it via `register_document_extractor` in a Rust shim crate that links
|
||||
// kreuzberg before the JVM loads the native library.
|
||||
```
|
||||
Reference in New Issue
Block a user