[][src]Crate rdftk_core

The core data model; concrete implementations for Statements and Literals, along with a concrete Resource type that provides a builder-like experience for models.

Example

use rdftk_core::{Literal, Statement, SubjectNode};
use rdftk_iri::IRI;
use std::rc::Rc;
use std::str::FromStr;

let mut statements: Vec<Rc<Statement>> = Default::default();

statements.push(Rc::new(Statement::new(
    SubjectNode::named(IRI::from_str("http://en.wikipedia.org/wiki/Tony_Benn").unwrap()),
    IRI::from_str("http://purl.org/dc/elements/1.1/title").unwrap(),
    Literal::new("Tony Benn").into(),
)));

Re-exports

pub use literal::*;
pub use qname::*;
pub use resource::*;
pub use statement::*;

Modules

error

Te Error and Result types for the entire toolkit.

literal

The Literal type used in the object component of a statement.

qname

A qualified name, QName implementation.

resource

Implementation of the Resource pattern as a kind of statement builder. As a builder type the interface is only additive, no update or remove methods exist.

statement

A single statement (subject, predicate, object) in the RDF data mode.