import { Edit } from "./Edit.js"; import { Concept } from "./Agent.js"; import { ActorAssignment, Belief, Certainty, DateAssignment, ObjectAssumption, ReferenceAssumption } from "./Assumption.js"; import { CollationTolerance } from "../collation/Collation.js"; import { AnySymbol } from "./Symbol.js"; import { WithId } from "../shared/utils.js"; /** * A derivation names the version another one was derived from, together * with the tolerance the two were collated at. How precisely the copies * put a symbol depends on what they are and on how their features were * obtained, so the tolerance can differ from derivation to derivation. * @see lrmoo:R76 is derivative of * @category Format types */ export type Derivation = ReferenceAssumption & { /** * The tolerance at which the derived version was collated against * the one it is based on. A derivation written before the tolerance * was held here states none. Not exported to RDF. * * It is an object assumption, so that a tolerance calculated from * the scatter of the readings can carry the inference it was drawn * by. It is the one quantity in the edition that decides what * counts as a reading at all, and a number arrived at by a method * should say so. */ collationTolerance?: ObjectAssumption; }; /** * The tolerance the derivation was collated at, or the default where it states none. * @category Collation and alignment */ export declare const collationToleranceOf: (derivation: Readonly) => CollationTolerance; /** * How long a version's paper runs for a length of the paper of the * version it derives from: about 0.77 for a Licensee or green re-cut of * a red roll, cut for a slower paper speed. * @see crm:E54 Dimension * @category Format types */ export interface LengthRatio { /** * @see crm:P90 has value */ value: number; /** * The standard uncertainty of the value, one standard deviation. * @see reo:uncertainty */ uncertainty?: number; } /** * How a version was made, where that is known and worth stating. * * A roll issued for another system was re-punched by an editor of the * publisher's, and that was an editorial act rather than a conversion: * Lawson names Kähle as the man who corrected second masters for the * green system. The rule he worked by is the procedure named here, and * the version's edits carry it out, so the mechanical part of a * transfer is stated once instead of being spelled out per note. * @see lrmoo:F28 Expression Creation * @category Format types */ export interface VersionCreation { /** * Who carried the act out. An `ObjectAssumption`, so an attribution * can carry the belief it rests on and the reasons for it. * @see crm:P14 carried out by */ actor?: ActorAssignment; /** * When it took place. * @see crm:P4 has time-span */ date?: DateAssignment; /** * The rule followed, as a term of the vocabulary: the notes stand * at their pitch, the expression is re-spelled in the other * system's words. * @see crm:P33 used specific technique */ procedure?: Concept; /** * How long the act made the version's paper for a length of the * paper of the version it derives from. A re-cut for a system whose * paper runs slower comes out shorter by the ratio of the speeds, * and the alignments of the copies measure that ratio more closely * than any label states a speed (`lengthRatioOf`). It is stated * where the edition holds to it, as a measurement naming the copies * it used and the program that found it, so that it can serve as a * premise. A speed follows from it only together with a premise * about the speed of the other version. * @see reo:lengthRatio */ lengthRatio?: ObjectAssumption; } /** * A version is defined by the sum of edits applied to the version it is * based on. What it is called is not stored with it: `siglaOf` reads the * sigla off the stemma, so that a label never outlives the arrangement * it describes. * @see lrmoo:F2 Expression * @category Format types */ export interface Version extends WithId { /** * The reproducing system this version is coded for. One roll was * often issued for several of them, and a version is a reading in * one system's words: its expression types are that system's * vocabulary and its notes sit on that bar's positions. A system * the type vocabulary knows carries the IRI of its concept as * `id`, from which the export takes the system's own context. * @see crm:P2 has type */ system: Concept; /** * The versions this one is held to derive from, each under the * belief it rests on. The text is read against the principal one * (`principalDerivationOf`); the others stand as hypotheses, such as * a contamination. A version that names none represents the mother * roll. * @see lrmoo:R76 is derivative of */ basedOn?: Derivation[]; /** * The act that made this version, where it is known: who carried it * out, when, and by what rule. The export states the act for every * version, stating nothing of it where nothing is known, so that the * axioms of reo.ttl can place it in time: it started after the * recording and the creation of every version it derives from had * started, and ended no later than the punching of any copy carrying * a symbol it added. A date stated here stands beside those; which of * them bounds the act closest is for a query to pick. * @see lrmoo:R17i was created by */ creation?: VersionCreation; /** * The list of edits that, applied to the base version, produce this * version. A hypothetical version whose changes nobody can state * leaves it out; it then reads as the version it derives from. * @see reo:involvedEdit */ edits?: Edit[]; } /** * The edits the version states, none where it leaves its text unstated. * @category Versions and stemma */ export declare const editsOf: (version: Readonly) => Edit[]; /** * The symbols the version's edits insert. * @category Versions and stemma */ export declare const insertedBy: (version: Readonly) => AnySymbol[]; /** * The ids of the symbols the version's edits delete. * @category Versions and stemma */ export declare const deletedBy: (version: Readonly) => string[]; /** * The parents the version names, in the order of `basedOn`, each with the * certainty its derivation is held with and the belief it rests on, where * it carries one. * @category Versions and stemma */ export declare const derivationsOf: (version: Readonly) => { parent: string; certainty: Certainty; belief?: Belief; }[]; /** * The derivation the version's text is read against: the first of those * held most certain. One held unlikely or false is a rejected hypothesis * and gives no text. Lowering the certainty of the principal derivation * below another's reads the version's edits against another parent. * @category Versions and stemma */ export declare const principalDerivationOf: (version: Readonly) => Readonly | undefined; /** * Whether the version derives from the other, directly or through the * versions between them, by any derivation it states, a hypothesis * among them: a hypothesis held more certain becomes the principal one. * A version derives from itself in no statement, and a stemma that * loops is walked once round. * @category Versions and stemma */ export declare const derivesFrom: (versions: readonly Readonly[], versionId: string, ancestorId: string) => boolean;