Crate rdftk_core[][src]

core This crate provides the core RDF data model; concrete implementations for Statements and Literals, along with a 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;use rdftk_core::statement::StatementList;

let mut statements: StatementList = Default::default();

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

Re-exports

pub use graph::Graph;
pub use graph::PrefixMappings;
pub use literal::DataType;
pub use literal::Literal;
pub use qname::QName;
pub use resource::Resource;
pub use statement::ObjectNode;
pub use statement::Statement;
pub use statement::SubjectNode;

Modules

error

Te Error and Result types for the entire toolkit.

graph

Traits which describe the capabilities of different Graph types.

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.