Skip to content

Migrating from v0.2 to v0.3

Dependency changes

v0.2:

[dependencies]
ontologos-core = "0.2"
ontologos-parser = "0.2"
ontologos-profile = "0.2"

v0.3 (add RDFS materialization):

[dependencies]
ontologos-core = "0.3"
ontologos-parser = "0.3"
ontologos-profile = "0.3"
ontologos-rdfs = "0.3"

RDFS materialization

v0.2: no reasoning engine shipped.

v0.3:

use ontologos_parser::load_ontology;
use ontologos_rdfs::RdfsEngine;

let mut ontology = load_ontology(path)?;
let report = RdfsEngine::new().materialize(&mut ontology)?;

Or via the reasoner facade:

use ontologos_core::{Profile, Reasoner};
use ontologos_rdfs::classify_reasoner;

let mut reasoner = Reasoner::builder()
    .profile(Profile::Rdfs)
    .build(ontology)?;
classify_reasoner(&mut reasoner)?;

CLI

v0.3 adds:

ontologos materialize ontology.owl
ontologos --format json materialize ontology.owl

classify runs RDFS materialization in v0.3 (OWL EL/RL classification remains v0.5). explain remains a stub until v0.6.

Breaking changes

None intentional for v0.2 JSON/builder/parser users upgrading to 0.3. ontologos-rdfs is an additive crate.