Class ExtractionBuilder<T>
java.lang.Object
ai.doctruth.ExtractionBuilder<T>
Immutable fluent builder for one extraction call. Each
with* method returns a
NEW instance — the receiver is never mutated, so a single builder can be safely shared
across threads and re-used across run(ParsedDocument) calls.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionrun(ParsedDocument doc) Execute the configured extraction.withAuditListener(AuditEventListener listener) Plug anAuditEventListenerinto this builder so every extraction emits one SIEM-friendly event.<V> ExtractionBuilder<T> withFieldConstraint(String fieldPath, Class<V> valueType, Predicate<V> predicate, String message) withMaxRetries(int n) withObjectConstraint(Predicate<T> predicate, String message)
-
Method Details
-
withProvenance
-
withBitemporal
-
withConfidence
-
withMaxRetries
-
withContextStrategy
-
withSourcePublishedAt
-
withFieldConstraint
-
withObjectConstraint
-
withAuditListener
Plug anAuditEventListenerinto this builder so every extraction emits one SIEM-friendly event. The default isAuditEventListener.NOOP; opt-in only.- Throws:
NullPointerException- iflisteneris null.
-
run
Execute the configured extraction.- Throws:
NullPointerException- ifdocis null.ExtractionException- on provider or schema-parse failure (cause-chain preserved).
-