Closed KonradHoeffner closed 1 year ago
The current state of IRIs in Sophia is a bit of a mess, as I already described here -- and I can never apologize enough for it. :confused:
If you know for sure that your predicates are absolute IRIs (which is the case if you parse standard RDF, as opposed to the [generalized RDF] supported by Sophia), then you can build your IriBox
like this:
IriRefBox::new_unchecked(triple.p().value().into())
Thanks, that is very helpful! I converted my usage of sophia::term::iri::Iri
to sophia::iri::Iri
.
I am confused by the different Iri structs in Sophia:
sophia::iri::Iri
andsophia::iri::IriBox
vssophia::term::iri::Iri
and hope someone an explain to me:sophia::iri::IriBox
but nosophia::term::iri::IriBox
?My use case is that I query a graph for triples using
triples_with_s
and then want to save the properties oftriple.p()
into aMap<IriBox,String>
but iri.boxed() fails withmethod not found in &sophia::term::iri::Iri<Arc<str>>
.