rdf-syntax 1.0.0

Lexical (syntactic) representation of RDF resources, built on top of rdf-types.
Documentation

RDF Syntax Data Types & Traits

GitHub Actions Workflow Status Crate informations Crates.io MSRV License Documentation

The Resource Description Framework (RDF) is a very simple graph data model defined by the World Wide Web Consortium (W3C) to represent arbitrary pieces of information, primarily intended for the web. Nodes of the graph are called resources, and resources are connected together using relations, which are resources themselves.

This crate is built on top of rdf-types to provide the lexical (syntactic) representation of resources (IRIs, blank node identifiers and literals) as defined by the RDF 1.1 Concepts and Abstract Syntax recommendation, along with the term definitions from RDF Schema (RDFS):

  • Id and BlankId represent, respectively, a resource identifier (an IRI or a blank node identifier) and a blank node identifier alone;
  • Literal and LiteralType represent RDF literals and their datatype (either an arbitrary IRI or the rdf:langString type paired with a LangTag);
  • Term and GroundTerm represent, respectively, a lexical RDF term (an Id or a Literal) and a ground term, which excludes blank node identifiers (an IRI or a Literal);
  • RdfTriple and RdfQuad are triples/quads built from those lexical terms, with Grdf-prefixed variants (GrdfTriple, GrdfQuad) allowing a blank node identifier anywhere in the triple/quad, for generalized RDF;
  • the Interpretation trait family maps lexical terms to the semantic resources of an rdf_types::Domain, turning lexical RDF data into the purely semantic representation manipulated by the rdf-types crate.

Every lexical type above comes in three flavors: an owned version (e.g. Term), a borrowed version (e.g. TermRef), and a copy-on-write version (e.g. CowTerm).

License

Licensed under either of

at your option.

Contribution

Read the CONTRIBUTING.md file before submitting any contribution. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.