Interface CortexIngestor
- All Known Subinterfaces:
Cortex
-
Method Summary
Modifier and TypeMethodDescriptionValidates the given assertions and stages them on a new branch.revise(ResourceEdit edit) Stages an edit to an already-approved resource on a new branch.
-
Method Details
-
ingest
Validates the given assertions and stages them on a new branch.The input must first pass the
lint checkagainst the ontology; assertions failing it are rejected without being staged. Input that lints clean is then validated against the configured SHACL shapes, together with the already approved assertions, so incoming statements may rely on approved ones to conform. If the union conforms, the statements not already approved are stored on a newly created branch awaitingapproval; otherwise nothing is stored and the validation errors are reported in the result. Statements that are already approved are never staged again; if nothing novel remains, no branch is created.- Parameters:
ttl- RDF assertions in Turtle syntax, based on the classes and properties ofthe ontology- Returns:
- the outcome, carrying either the name of the created branch —
nullif every assertion was already approved — or the lint or validation errors
-
revise
Stages an edit to an already-approved resource on a new branch.Editing an approved statement means retracting it as well as asserting its replacement, so the branch this stages carries both: the statements to add and the statements to remove. It is still only a proposal — nothing reaches the approved assertions until the branch is
approved, which is the same guaranteeingest(String)gives.The additions must lint clean against the ontology, and the assertions as they would be once the branch is approved must conform to the configured SHACL shapes — a stricter check than
ingest(String)makes, because a retraction can break a constraint an approved statement was satisfying. If either fails, nothing is staged and the errors are reported in the result. Additions already approved and retractions of statements that are not approved are dropped; if nothing remains, no branch is created.- Parameters:
edit- the proposed edit- Returns:
- the outcome, carrying either the name of the created branch —
nullif the edit would change nothing — or the lint or validation errors
-