This crate provides the core RDF data model; concrete implementations for
Statement
s and Literal
s, along with a Resource
type that provides a builder-like experience for models.
```rust use rdftkcore::{Literal, Statement, StatementList, SubjectNode}; use rdftkiri::IRI; use std::rc::Rc; use std::str::FromStr;
pub fn make_statements() -> StatementList { let mut statements: StatementList = Default::default();
statements.push(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(),
).into());
// ...
statements
} ```
Version 0.1.12
Version 0.1.11
StatementRef
and StatementList
rather than having Rc
obviously in all APIs.Version 0.1.10
ContextNode
) to Statement
.Version 0.1.9
Statement
.Statement
.rdf_type
to instance_of
for compatibility with RDF schema usage.is_valid
associated function to QName
.Version 0.1.8
pub use *
.Version 0.1.7
Graph
into Graph
and MutableGraph
.NamedGraph
into NamedGraph
and MutableNamedGraph
.get_default_namespace
to the PrefixMappings
trait as a helper function.PrefixMappings::compress
and PrefixMappings::expand
to take references.Version 0.1.6
Version 0.1.5
Version 0.1.4
Version 0.1.3
IRI
to IRIRef
on interfaces.Graph
and associated types into core and deprecated rdftk_graph
.Version 0.1.2
Version 0.1.1
From
to allow direct construction of a SubjectNode
from an IRI
.QName
that dropped the ":" for non-prefixed values.Version 0.1.0
TBD