Skip to content

Commit

Permalink
Use rdf-type 0.12.17 vocabulary::Scoped.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Jan 24, 2023
1 parent d597a3d commit af9dbe7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static-iref = "2.0"
locspan = "0.7.11"
locspan-derive = "0.6"
codespan-reporting = "0.11"
rdf-types = "0.12.16"
rdf-types = "0.12.17"
xsd-types = "0.5.5"
grdf = "0.16.3"
shelves = "1"
Expand Down
22 changes: 16 additions & 6 deletions build/src/context/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use ::treeldr::{
};
use locspan::{Meta, Span};
use nquads_syntax::Parse;
use rdf_types::{Generator, VocabularyMut};
use rdf_types::{generator::Unscoped, vocabulary::Scoped, Generator, VocabularyMut};

use crate::{Document, ScopedGenerator, ScopedVocabulary};
use crate::Document;

use super::Context;

Expand Down Expand Up @@ -55,8 +55,8 @@ impl<M> Context<M> {
) where
M: Clone + Ord + Merge,
{
let mut scoped_vocabulary = ScopedVocabulary::new(vocabulary, scope);
let mut scoped_generator = ScopedGenerator(generator);
let mut scoped_vocabulary = Scoped::new(vocabulary, scope);
let mut unscoped_generator = Unscoped(generator);

let doc = nquads_syntax::Document::parse_str(content, metadata)
.ok()
Expand All @@ -74,11 +74,21 @@ impl<M> Context<M> {
.collect();

dataset
.declare(&mut (), self, &mut scoped_vocabulary, &mut scoped_generator)
.declare(
&mut (),
self,
&mut scoped_vocabulary,
&mut unscoped_generator,
)
.ok()
.unwrap();
dataset
.define(&mut (), self, &mut scoped_vocabulary, &mut scoped_generator)
.define(
&mut (),
self,
&mut scoped_vocabulary,
&mut unscoped_generator,
)
.ok()
.unwrap();
}
Expand Down
2 changes: 0 additions & 2 deletions build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub mod list;
pub mod prop;
pub mod rdf;
pub mod resource;
mod scope;
mod single;
pub mod ty;
pub mod utils;
Expand All @@ -21,7 +20,6 @@ pub use layout::{ParentLayout, SubLayout};
pub use list::{ListMut, ListRef};
pub use multiple::Multiple;
pub use prop::Property;
pub use scope::*;
pub use single::Single;
pub use ty::Type;

Expand Down
84 changes: 0 additions & 84 deletions build/src/scope.rs

This file was deleted.

0 comments on commit af9dbe7

Please sign in to comment.