| Crates.io | field33_rdftk_core_temporary_fork |
| lib.rs | field33_rdftk_core_temporary_fork |
| version | 0.3.1 |
| created_at | 2022-08-23 09:23:00.781716+00 |
| updated_at | 2022-08-23 09:23:00.781716+00 |
| description | 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. |
| homepage | |
| repository | https://github.com/johnstonskj/rust-rdftk.git |
| max_upload_size | |
| id | 650884 |
| size | 236,596 |
This crate provides an implementation of the RDF abstract syntax along with a
Resource type that provides a builder-like experience for models.
From RDF 1.1 Concepts and Abstract Syntax;
The core structure of the abstract syntax is a set of triples, each consisting of a subject, a predicate and an object. A set of such triples is called an RDF graph. An RDF graph can be visualized as a node and directed-arc diagram, in which each triple is represented as a node-arc-node link.
There can be three kinds of nodes in an RDF graph: IRIs, literals, and blank nodes.
In this library the triple, or statement, as well as subject, predicate, and object types are
in the module statement. Literal's as objects are supported in the
literal module. Traits that describe graphs are provided by the
graph module.
Additional features are provided such as support for data sets (module model.data_set)
as well as support for extensions to the core RDF abstract model such as
RDF-star.
use field33_rdftk_core_temporary_fork::{Literal, Statement, StatementList, SubjectNode};
use field33_rdftk_iri_temporary_fork::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.3.1
Version 0.3.0
Version 0.2.4
Version 0.2.3
Version 0.2.2
Version 0.2.1
Version 0.2.0
Statement, and statement components are now passed as Rc references.
Graph and DataSet now use type parameters to describe iterators returned by query methods.QName constructors now return errors instead of panic on invalid values.chrono::Duration in literals as well as the std version as chrono supports the correct output form.eq_ methods on SubjectNode and ObjectNode for simple testing of inner values.Version 0.1.15
Version 0.1.14
Version 0.1.13
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