.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user