Persistable Propositions
Result of entity and proposition extraction that can be persisted. Combines com.embabel.dice.common.EntityExtractionResult and PropositionExtractionResult. Guides callers to know what to persist, within their own transaction scope.
Inheritors
Properties
Statistics about entity extraction outcomes
Whether revision was enabled
Statistics about revision outcomes
All propositions extracted (before any revision).
All propositions that need to be persisted after revision. Includes both new propositions and updates to existing ones:
All revision results
Functions
All entities that need to be persisted (new + updated). Does not include reference-only entities.
Entities that are new (not matched to any existing entity). These should be saved to the entity repository.
Persist extracted entities and propositions to their respective repositories. Also creates structural relationships:
The first half of persistReturningCanonical: entities and propositions are saved, and nothing else happens. Saved means committed only when no transaction wraps the call; inside an ambient transaction the claims land with the caller's commit, not here.
Persist the same things persist does, and report which stored proposition each extracted one landed on.
Entities that were matched to known entities that should not be updated. These are typically entities managed by external services (e.g., the current user). They are referenced in propositions but not persisted during extraction.
Entities that were matched to existing entities and may have updated information. These should be updated in the entity repository.
The second half of persistReturningCanonical: the chunk, proposition and entity edges, wired against the propositions the repository returned so every edge lands on a node the store actually holds.