KnowledgeAssessmentInput class final

What a Profile assessment judges, all in memory: okf's load results and the selection they are judged with.

A write (KnowledgeWriter.prepare) judges the bundle as it stands (base) and okf's prepared candidate (candidate). Adoption (KnowledgeAdoption) judges one bundle, the one it seeds or binds, with nothing to compare: its input has no base.

It holds no file handle, lock or callback into the caller, so a host may send it to another isolate and run assess there, as assessWithin does.

Constructors

KnowledgeAssessmentInput({required OkfBundleLoadResult base, required OkfBundleLoadResult candidate, required ProfileSelection selection, ProfileValidator validator = const ProfileValidator()})
A write's input: base, the bundle as it stands, and candidate, the bundle the write would leave.
const
KnowledgeAssessmentInput.bundle({required OkfBundleLoadResult bundle, required ProfileSelection selection, ProfileValidator validator = const ProfileValidator()})
One bundle to judge with no base, as adoption judges the bundle it seeds or binds: candidate is bundle, and base is null.
const

Properties

base → OkfBundleLoadResult?
The bundle as it stands, for a write; null for one bundle judged on its own.
final
candidate → OkfBundleLoadResult
The bundle being judged: a write's candidate, or adoption's bundle.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selection → ProfileSelection
final
validator → ProfileValidator
final

Methods

assess() → KnowledgeAssessment
Judges candidate, and base when there is one, with ProfileValidator.validateLoaded. It runs the base's rules even when OKF blocks the base, so a write that repairs OKF is charged only with the findings it adds.
assessWithin({Duration timeout = assessTimeout, WayfinderCancellation? cancel}) → Future<KnowledgeAssessment>
assess, bounded: it runs on an isolate of its own, which is killed once it runs past timeout or cancel is cancelled. A host passes it as its KnowledgeAssessor to KnowledgeWriter and KnowledgeAdoption:
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

assessTimeout → const Duration
How long assessWithin lets an assessment run by default.