DefaultGroundingResolver

class DefaultGroundingResolver(repository: <Error class: unknown class>, entityLabel: String = ENTITY_LABEL) : GroundingResolver

Standard repository-backed GroundingResolver. Resolution is:

  1. ExactfindById(groundingId). The id the caller passed is the node id verbatim. Most groundings hit here.

  2. Namespace suffix — on a miss, match any entity whose id ends with the grounding id's trailing segment (everything after the first :). This bridges email:<hash> grounding to the stored email:<user>:<hash> node, mirroring how the source-text readers have always matched (n.id ENDS WITH <suffix>).

A grounding id with no : (a bare chunk hash / free-text fingerprint) only ever matches exactly — never by suffix — so legacy chunk ids stay unresolved (and edge-free), exactly as before.

Constructors

Link copied to clipboard
constructor(repository: <Error class: unknown class>, entityLabel: String = ENTITY_LABEL)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun resolve(groundingId: String): <Error class: unknown class>?

Single best resolution: the exact match, else the unique match. Returns null when nothing matches OR the result is ambiguous (more than one node) — an ambiguous match is never silently collapsed to an arbitrary node.

Link copied to clipboard
open override fun resolveAll(groundingId: String): List<<Error class: unknown class>>

Every entity groundingId resolves to. Empty when nothing matches. A proposition grounded in several sources legitimately resolves to several nodes, so this returns all of them.