Package ai.chatur.cortex
Interface CortexLinter
- All Known Subinterfaces:
Cortex
public interface CortexLinter
Validates RDF assertions against the ontology before they are ingested.
-
Method Summary
-
Method Details
-
lint
Lints the given assertions againstthe ontology.Every property used must be declared in the ontology, and every
rdf:typeobject must be a class declared in the ontology. The only terms permitted beyond the ontology arerdf:type,rdfs:label, andrdfs:comment.ingestperforms this same lint check internally — and the subsequent SHACL validation, which this method does not — so calling this first is not required for correctness; it exists to let a caller (an AI agent, in particular) catch and fix ontology violations before attempting a full ingestion. Note thatingestre-parses the caller's original Turtle rather than consumingthe validated Turtle this returns, so passing anything other than that exact string toingestafterward is equally valid.- Parameters:
ttl- RDF assertions in Turtle syntax- Returns:
- the outcome, carrying either the validated assertions in Turtle syntax or the lint violations
-