Expand description
In-memory implementation of RDF graphs.
Usage example:
use oxrdf::*;
let mut graph = Graph::default();
// insertion
let ex = NamedNodeRef::new("http://example.com")?;
let triple = TripleRef::new(ex, ex, ex);
graph.insert(triple);
// simple filter
let results: Vec<_> = graph.triples_for_subject(ex).collect();
assert_eq!(vec![triple], results);
// Print
assert_eq!(
graph.to_string(),
"<http://example.com> <http://example.com> <http://example.com> .\n"
);
See also Dataset
if you want to get support of multiple RDF graphs at the same time.
Structs§
- An in-memory RDF graph.
- Iterator returned by
Graph::iter
.
Enums§
- An algorithm used to canonicalize graph and datasets.