Skip to main content

Crate rdftk_io

Crate rdftk_io 

Source
Expand description

io This crate provides traits for reading and writing Statements and 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.

ModuleNameMIME TypeR/W
ntRDF 1.1 N-Triples; A line-based syntax for an RDF graphapplication/n-triplesR+W
nqRDF 1.1 N-Quads; A line-based syntax for RDF datasetsapplication/n-quadsW
turtleRDF 1.1 Turtle; Terse RDF Triple Languagetext/turtleW
trigRDF 1.1 TriG; RDF Dataset Languageapplication/trig
xmlRDF 1.1 XML Syntaxapplication/rdf+xmlW
jsonRDF 1.1 JSON Alternate Serializationapplication/rdf+jsonW
n3Notation3 (N3): A readable RDF syntaxtext/rdf+n3W
TBDBinary RDF Representation for Publication and Exchange (HDT)N/A
TBDRDF Binary using Apache Thriftapplication/x-binary-rdf
TBDJSON-LD 1.1; A JSON-based Serialization for Linked Dataapplication/ld+json
TBDRDFa Core 1.1 - Third Editiontext/html

Each module will also provide public constants NAME, FILE_EXTENSION, and MIME_TYPE.

Modules§

dot
Provides for writing a Graph instance in the GraphViz dot file format.
json
Provides for writing a Graph instance in the W3C RDF 1.1 JSON Alternate Serialization (RDF/JSON) format.
n3
Provides for reading and writing a Graph instance in the proposed W3C Notation3 (N3), a readable RDF syntax, format.
nq
Provides for reading and writing a NamedGraph instance in the W3C RDF 1.1 N-Quads, a line-based syntax for RDF datasets, format.
nt
Provides for reading and writing a Graph instance in the W3C RDF 1.1 N-Triples, a line-based syntax for an RDF graph format.
trig
Provides for reading and writing a Graph instance in the W3C RDF 1.1 TriG, RDF Dataset Language format.
turtle
Provides for reading and writing a Graph instance in the RDF 1.1 Turtle, Terse RDF Triple Language, format.
xml
Provides for writing out in the RDF 1.1 XML Syntax format.

Macros§

make_factory_options

Traits§

DataSetWriter
GraphWriter
HasOptions
This trait is implemented by reader or writer types to attach option instances for configuration.
ObjectWriter
The trait implemented by types which write instances of T.