ProvenanceEntry

data class ProvenanceEntry constructor(val locator: SourceLocator, val chunkId: String? = null, val startOffset: Int? = null, val endOffset: Int? = null, val contentHash: String? = null, val sourceRevision: String? = null)

Links a proposition to the source material it was derived from.

Each entry carries a SourceLocator identifying where the material lives, together with optional detail locating the content within that source: the originating chunk, a character offset range, and a content hash. This rich provenance carries more detail than a bare list of chunk IDs.

All detail beyond the locator is optional, so coarse provenance (the source document) and precise provenance (a character range within a chunk) share a single representation.

Constructors

Link copied to clipboard
constructor(locator: SourceLocator, chunkId: String? = null, startOffset: Int? = null, endOffset: Int? = null, contentHash: String? = null, sourceRevision: String? = null)

Properties

Link copied to clipboard
val chunkId: String? = null

Optional ID of the chunk this provenance came from

Link copied to clipboard
val contentHash: String? = null

Optional hash of the source content. Comparing it against the source later can reveal that the source has since changed.

Link copied to clipboard
val endOffset: Int? = null

Optional exclusive end character offset within the source/chunk

Link copied to clipboard

Reference to where the source material lives

Link copied to clipboard
val sourceRevision: String? = null

Optional provider-defined opaque revision of the source

Link copied to clipboard
val startOffset: Int? = null

Optional inclusive start character offset within the source/chunk