[][src]Crate sophia

This crate aims to provide a comprehensive toolkit for working with RDF and Linked Data in Rust.

RDF is a data model designed to exchange knowledge on the Web in an interoperable way. Each piece of knowledge in RDF (a statement) is represented by a triple, made of three terms. A set of triples forms an RDF graph. Finally, several graphs can be grouped in a collection called a dataset, where each graph is identified by a unique name.

Generalized vs. Strict RDF model

The data model supported by this crate is in fact a superset of the RDF data model as defined by the W3C. When the distinction matters, they will be called, respectively, the generalized RDF model, and the strict RDF model.

Examples

Modules

dataset

An RDF dataset is composed of a default graph, and zero or more named graphs, each associated with a graph name.

error

Types for handling errors.

graph

An RDF graph, the central notion of the RDF data model, is a collection of triples.

ns

Standard and custom namespaces.

parser

Parsers for standard RDF syntaxes, and tools for building new parsers.

quad

A quad expresses a single fact within a context. Quads are like RDF triples(../triple/index.html) augmented with an optional graph name.

query

Query processing over RDF graphs and datasets.

serializer

Serializers for standard RDF syntaxes, and tools for building new serializers.

term

Terms are the building blocks of an RDF graph. There are four types of terms: IRIs, blank nodes (BNode for short), literals and variables.

triple

An RDF triple expresses a single fact. Its formed of three terms called subject, predicate and object.

Macros

def_default_quad_parser_api

This macro provides a straightforward implementation of the default functions of a parser module producing quads.

def_default_serializer_api

This macro provides a straightforward implementation of the default functions of a serializer module.

def_default_triple_parser_api

This macro provides a straightforward implementation of the default functions of a parser module producing triples.

def_quad_stringifier

This macro provides a straightforward implementation of the Stringifier type, based on the Writer type, for quads.

def_triple_stringifier

This macro provides a straightforward implementation of the Stringifier type, based on the Writer type, for triples.

impl_dataset_for_wrapper

Defines the implementation of Dataset for DatasetWrapper.

impl_graph_for_wrapper

Defines the implementation of Graph for GraphWrapper.

impl_indexed_dataset_for_wrapper

Defines the implementation of IndexedDataset for DatasetWrapper around another IndexedDataset.

impl_indexed_graph_for_wrapper

Defines the implementation of IndexedGraph for GraphWrapper around another IndexedGraph.

impl_mutable_dataset_for_indexed_dataset

Defines the implementation of MutableDataset for IndexedDataset.

impl_mutable_graph_for_indexed_graph

Defines the implementation of MutableGraph for IndexedGraph.

namespace

Helper for creating a "namespace module" defining a set of terms within a given IRI space.