-
Hello @pchampin , Currently it is possible to convert It would be much useful if we can specify triplesource_fallback_graph_iri too for such conversion. Thanks in advance for your help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The original idea was that the following code would do the trick: my_quad_source.map_quads(Quad::wrap_as_triple) Indeed A workaround consist in writing your own function that copies the terms of the quad, e.g.: fn q2t<Q: Quad>(q: Q) -> [BoxTerm; 3] {
[q.s().copied(), q.p().copied(), q.o().copied()]
} and then let triple_src = quad_src.map_quads(|q| q2t(q)); Ultimately, I hope to get the example above working (the one using |
Beta Was this translation helpful? Give feedback.
-
Hello @pchampin, i do published a crate rdf_dynsyn, (source: @ github). This crate provides sophia-compatible and sophia-based rdf parsers/serializers, that can be instantiated against any of supported syntaxes dynamically at run time. request feedback, as i am quite new to rust. |
Beta Was this translation helpful? Give feedback.
The original idea was that the following code would do the trick:
Indeed
quad::stream::MapSource
implementsTripleSource
if the passed closure producesTriple
s (see API doc).Unfortunately, this does not work in the general case, because of some arcane lifetime issue :-/ My bad.
A workaround consist in writing your own function that copies the terms of the quad, e.g.:
and then
Ultimately, I hope to get the example above working (the one using
Quad:wrap_as_triple
), but that may occur only in release 0.…