Crate oxrdf

source ·
Expand description

OxRDF

Latest Version Released API docs Crates.io downloads actions status Gitter

OxRDF is a simple library providing datastructures encoding RDF 1.1 concepts.

This crate is intended to be a basic building block of other crates like Oxigraph or Spargebra.

Support for RDF-star is available behind the rdf-star feature.

OxRDF is inspired by RDF/JS and Apache Commons RDF.

Usage example:

use oxrdf::*;

let mut graph = Graph::default();

// insertion
let ex = NamedNodeRef::new("http://example.com").unwrap();
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);

License

This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or <http://www.apache.org/licenses/LICENSE-2.0>)
  • MIT license (LICENSE-MIT or <http://opensource.org/licenses/MIT>)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Re-exports

pub use crate::dataset::Dataset;
pub use crate::graph::Graph;

Modules

Structs

An owned RDF blank node.
An error raised during BlankNode IDs validation.
A borrowed RDF blank node.
An error raised during Iri validation.
An error raised during LanguageTag validation.
An owned RDF literal.
A borrowed RDF literal.
An owned RDF IRI.
A borrowed RDF IRI.
An owned triple in an RDF dataset.
A borrowed triple in an RDF dataset.
An error raised during term serialization parsing using the FromStr trait.
A SPARQL query owned variable.
An error raised during Variable name validation.
A SPARQL query borrowed variable.

Enums

A possible owned graph name. It is the union of IRIs, blank nodes, and the default graph name.
A possible borrowed graph name. It is the union of IRIs, blank nodes, and the default graph name.
The owned union of IRIs and blank nodes.
The borrowed union of IRIs and blank nodes.
The owned union of IRIs, blank nodes and triples (if the rdf-star feature is enabled).
The borrowed union of IRIs, blank nodes and triples (if the rdf-star feature is enabled).
An owned RDF term It is the union of IRIs, blank nodes, literals and triples (if the rdf-star feature is enabled).
A borrowed RDF term It is the union of IRIs, blank nodes, literals and triples (if the rdf-star feature is enabled).