Skip to main content

Crate ontologos_core

Crate ontologos_core 

Source
Expand description

Core data model and reasoner API for OntoLogos.

v0.1 provides an in-memory ontology representation with interned IRIs, typed entities, structured axioms, secondary indexes, and JSON v2 serialization. OWL file parsing is available in v0.2 via ontologos-parser.

§Quick example

use ontologos_core::{Error, Ontology};

fn main() -> Result<(), Error> {
    let ontology = Ontology::builder()
        .class("http://example.org/Pizza")?
        .class("http://example.org/Food")?
        .subclass_of("http://example.org/Pizza", "http://example.org/Food")?
        .build()?;
    assert_eq!(ontology.axiom_count(), 1);
    Ok(())
}

Structs§

AxiomId
Stable identifier for a stored axiom.
AxiomIndex
Secondary indexes over axioms for fast engine lookups.
AxiomStore
Storage for ontology axioms.
EntityId
Stable identifier for an ontology entity. Opaque entity identifier (index into the entity registry).
EntityRecord
A registered ontology entity with its interned IRI and kind.
EntityRegistry
Registry mapping interned IRIs to typed entities.
InternPool
Deduplicating pool of absolute IRI strings.
IriId
Stable identifier for an interned IRI string.
Limits
Resource limits for ontology JSON deserialization.
Ontology
In-memory ontology with interned IRIs, typed entities, and indexed axioms.
OntologyBuilder
Fluent builder for constructing ontologies in memory.
Reasoner
Main reasoner facade over profile-specific engines.
ReasonerBuilder
Builder for constructing a configured reasoner instance.
ReasonerConfig
Configuration options for the reasoner builder.

Enums§

Axiom
Supported axiom types in the 1.x reasoner.
EntityKind
Kind of entity stored in the ontology registry.
Error
Errors produced by the core ontology model.
Profile
OWL profile selected for reasoning.

Type Aliases§

Result
Result type alias using [Error].