|0.2.1||Jun 14, 2021|
|0.2.0||Jun 8, 2021|
|0.1.9||May 27, 2021|
|0.1.6||Apr 24, 2021|
|0.1.0||Jul 28, 2020|
#888 in Web programming
45 downloads per month
Used in 3 crates (2 directly)
This crate provides traits for reading and writing
Graphs as well as implementations of these for common representations.
The following are some well-known formats (see Wikipedia
for a description of different serializations), support is indicated in the final column with
an R for read support and W for write support. One additional module,
dot allows for the
creation of GraphViz dot files for a visualization of a graph's structure.
||RDF 1.1 N-Triples; A line-based syntax for an RDF graph||
||RDF 1.1 N-Quads; A line-based syntax for RDF datasets||
||RDF 1.1 Turtle; Terse RDF Triple Language||
||RDF 1.1 TriG; RDF Dataset Language||
||RDF 1.1 XML Syntax||
||RDF 1.1 JSON Alternate Serialization||
||Notation3 (N3): A readable RDF syntax||
|TBD||Binary RDF Representation for Publication and Exchange (HDT)||N/A|
|TBD||RDF Binary using Apache Thrift||
|TBD||JSON-LD 1.1; A JSON-based Serialization for Linked Data||
|TBD||RDFa Core 1.1 - Third Edition||
Each module will also provide public constants
An example, reading an existing NTriple file.
use rdftk_io::nt::reader::NTriplesReader; use rdftk_io::GraphReader; use rdftk_memgraph::simple::graph_factory; use std::fs::File; use std::path::PathBuf; let file_path = PathBuf::from("tests/w3c/nt/literal.nt"); let mut file = File::open(file_path).unwrap(); let reader = NTriplesReader::default(); let graph = reader.read(&mut file, graph_factory()).unwrap();
- Added JSON reader.
- Updated rdftk_core dependency to 0.3.0, this is a significant API change.
- All read operations require a graph factory now.
- Added unicode escape handling into the IRI parsing.
- All W3C test cases for NTriples now passing.
- Removed local error module, using core error types now.
- Using new style interfaces, a consistent use of traits and trait reference types.
- Have a working NTriple parser.
- Using rdftk_core 0.2, this has changes in the signature of both Graph and DataSet traits.
- This results in changes to both GraphWriter and DataSetWriter traits.
- Applied a lot more warnings in lib.rs
- Fixed resulting Clippy suggestions.
- Made all modules have separate reader/writer sub-modules.
- Put all modules behind features.
- Added JSON writer.
- Re-write NQuad writer to write datasets.
- Re-wrote NTripe writer to use NQuad writer.
- Fixed formatting in Turtle writer.
- Added XML writer.
- Internal change to use
- API changes in core crate:
PrefixMappings::expandto take references.
- Made all
- Made all local dependencies only major/minor valued.
- First release.
- Provides write support only for N-Triples, N-Quads, and GraphViz.
- The core; N-Triples, N-Quads, N3, and Turtle need read and write support.
- The extended core; RDF/XML, JSON-LD, and RDFa need read and write support.
- The rest; RDF/JSON, TriG, HDT, and BinaryRDF will be implemended as needed.