Crates.io | atelier_rdf |
lib.rs | atelier_rdf |
version | 0.1.12 |
source | src |
created_at | 2020-07-28 14:30:13.571623 |
updated_at | 2021-07-02 17:59:43.551954 |
description | Rust native RDF format for the AWS Smithy semantic model. |
homepage | |
repository | https://github.com/johnstonskj/rust-atelier.git |
max_upload_size | |
id | 270458 |
size | 67,797 |
Provides the ability to read and write Smithy models to and from the W3C's Resource Description Framework (RDF).
This crate provides a common mapping between the Smithy semantic model, and an RDF vocabulary. This mapping can be used to serialize the resulting RDF graph to one of the standard RDF representations, or store in a graph store. The mapping allows for models to be augmented by additional facts in the RDF graph and allows for inference over the model in it's RDF form.
The following simply constructs an RDF Graph from a provided model.
use atelier_core::model::Model;
use atelier_rdf::model::model_to_rdf;
let model = make_model();
let rdf_graph = model_to_rdf(&model, None).unwrap();
This example writes the provided model in RDF's Turtle serialization representation.
use atelier_core::model::Model;
use atelier_core::io::ModelWriter;
use atelier_rdf::writer::RdfWriter;
use std::io::stdout;
let model = make_model();
let mut writer = RdfWriter::default();
writer.write(&mut stdout(), &model).unwrap();
Version 0.1.12
Version 0.1.11
Version 0.1.10
Version 0.1.9
Version 0.1.8
Version 0.1.7
Version 0.1.6
Version 0.1.5
Version 0.1.4
ModelWriter
implementationiri_to_shape
.Version 0.1.3
HasIdentity
and HasTraits
.Version 0.1.2
rdftk_iri
, which involved changes.SmithUrn
type and use IRIRef
directly instead.Version 0.1.1
Model
to RDF mapping; document this in the model
module, and implement model::model_to_rdf
.Version 0.1.0
SmithyUrn
type as a URI for RDF usage.