RelatedEntity

data class RelatedEntity(val entityId: String, val via: List<Proposition>, val distance: Int = 1)

A single related entity within a GraphNeighborhood.

Constructors

Link copied to clipboard
constructor(entityId: String, via: List<Proposition>, distance: Int = 1)

Properties

Link copied to clipboard
val distance: Int = 1

the number of hops from the queried entity to this entity (1 = directly related to the origin). Distinguishes direct relations from transitive ones so a multi-hop relation is not misread as a direct edge.

Link copied to clipboard

the related entity's opaque string identifier

Link copied to clipboard

the propositions on the edge that directly connects this entity to its immediate predecessor on the discovery path — each proposition mentions this entity and the node one hop closer to the origin. At distance 1 the predecessor IS the queried entity, so these propositions mention the origin directly; at greater distances they connect this entity to an intermediate hop, not to the origin. This keeps attribution honest: a far entity never claims a direct edge to the origin via a proposition that does not mention it.