timetoshare.validation.statements#

Statement rules: the context, reserved keys, IRIs and provenance of statements.

The schema checks the shape of @context, every statements container and every provenance list; the rules here reach beyond it, in this order: a manifest carrying statements or provenance holds @context (context); no element of the manifest uses a key JSON-LD would read (reserved_key); then, subject by subject, the subject’s ID is an IRI fragment, every compact IRI names a declared prefix (iri), every # reference names an element (dangling_target), a node naming an element holds its ID alone (element_value), a statement value is no float (representation), a date is a calendar day (calendar_date), each provenance entry repeats no earlier entry’s pair (provenance_duplicate) and no actor holds two beliefs in one entry (belief_actor). An entry may match a stated pair or none: an entry of a pair not stated is a candidate. Last, the provenance of the flow-control elements and of the FlowMaps, whose entries name no pair: every compact IRI names a declared prefix (iri), every # reference an element (dangling_target), a date is a calendar day (calendar_date), then entry by entry no actor holds two beliefs (belief_actor). After them, rule by rule, the class of each selector of graphical.rules written as a compact IRI names a declared prefix (iri), but for tts, which in a selector always stands for the format’s namespace. The manifest is read with bare IDs; the IRIs of statements are the same in either form. The walks read any value, so a reader of part of a manifest can check its statements alone.

timetoshare.validation.statements.statement_rule_problems(manifest)[source]#

Yield every problem of the statement rules, in the order of the rules.

The context rule over every subject, then the reserved keys of the manifest, the timelines and regions in subject order and the groups, each element’s keys in code-point order, then the subject walk, then the provenance of the flow-control elements and the FlowMaps, then the class of each rule’s selector. The manifest is taken with bare IDs and its statements and provenance as schema-checked; everything else is read wherever it has the expected type.

timetoshare.validation.statements.statement_warnings(manifest)[source]#

Return the warnings of a valid manifest, sorted by path, then code.

context_absent at the root for a manifest without @context; bundle_blank at statements (else provenance) for a manifest stating pairs or provenance without an id, whose subject is then a blank node.