RDF Syntax Data Types & Traits
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):
IdandBlankIdrepresent, respectively, a resource identifier (an IRI or a blank node identifier) and a blank node identifier alone;LiteralandLiteralTyperepresent RDF literals and their datatype (either an arbitrary IRI or therdf:langStringtype paired with aLangTag);TermandGroundTermrepresent, respectively, a lexical RDF term (anIdor aLiteral) and a ground term, which excludes blank node identifiers (an IRI or aLiteral);RdfTripleandRdfQuadare triples/quads built from those lexical terms, withGrdf-prefixed variants (GrdfTriple,GrdfQuad) allowing a blank node identifier anywhere in the triple/quad, for generalized RDF;- the
Interpretationtrait family maps lexical terms to the semantic resources of anrdf_types::Domain, turning lexical RDF data into the purely semantic representation manipulated by therdf-typescrate.
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.