Interface CortexLinter

All Known Subinterfaces:
Cortex

public interface CortexLinter
Validates RDF assertions against the ontology before they are ingested.
  • Method Summary

    Modifier and Type
    Method
    Description
    lint(String ttl)
    Lints the given assertions against the ontology.
  • Method Details

    • lint

      LintResult lint(String ttl)
      Lints the given assertions against the ontology.

      Every property used must be declared in the ontology, and every rdf:type object must be a class declared in the ontology. The only terms permitted beyond the ontology are rdf:type, rdfs:label, and rdfs:comment.

      ingest performs 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 that ingest re-parses the caller's original Turtle rather than consuming the validated Turtle this returns, so passing anything other than that exact string to ingest afterward 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