This commit is contained in:
2026-08-07 19:28:08 -04:00
parent 36a105edfc
commit 64a2c87346
4 changed files with 112 additions and 48 deletions
+2 -13
View File
@@ -60,7 +60,6 @@ static PREFIXES: LazyLock<BTreeMap<String, String>> = LazyLock::new(|| {
pub struct OntologyBuilder {
path: Option<PathBuf>,
materialize_inferences: bool,
}
impl OntologyBuilder {
@@ -70,18 +69,9 @@ impl OntologyBuilder {
self
}
pub fn materialize_inferences(mut self) -> Self {
self.materialize_inferences = true;
self
}
pub fn build(self) -> error::Result<Ontology> {
let mut store = if let Some(path) = self.path {
if self.materialize_inferences {
Store::open(path)
} else {
Store::open_read_only(path)
}
let store = if let Some(path) = self.path {
Store::open(path)
} else {
Store::new()
}?;
@@ -158,7 +148,6 @@ impl Ontology {
pub fn builder() -> OntologyBuilder {
OntologyBuilder {
path: None,
materialize_inferences: false,
}
}