Skip to main content

gate

Function gate 

Source
pub fn gate(
    data: &Graph,
    context: &Graph,
    schema: &Schema,
    delta: &GraphDelta,
) -> Result<RepairOutcome, NonStratifiable>
Expand description

Validate data ⊕ delta against schema and diff the violations against data’s. Paths and the class hierarchy are evaluated against context, which should contain data; pass data again when there is no separate shapes/ontology graph. For split inputs context = data ∪ shapes, so the re-validation sees (data ⊕ δ) for focus and (context ⊕ δ) for evaluation — letting the gate discharge a constraint like sh:class C against a value typed with a subclass of C when the hierarchy lives in the shapes graph. The gate dual of crate::validate_with_context. Errors only if the schema is not stratifiable.