Expand description
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).
Re-exports§
Modules§
- btree_
dataset - btree_
graph - diff
- Diff between two RDF datasets.
- fallible
- generator
- indexed_
btree_ dataset - indexed_
btree_ graph - iri
- pattern
- Triple/quad patterns, used to describe a set of triples/quads by leaving some of their components unspecified (variables).
- util
- Small iterator adapters shared by the fallible/owned trait implementations of this crate.
Macros§
- blankid
- grdf_
quad - Creates a gRDF quad.
- grdf_
quad_ pattern - Creates a gRDF quad pattern.
- grdf_
quads - Creates an array of quads.
- grdf_
triple - Creates a gRDF triple.
- grdf_
triples - Creates an array of triples.
- iri
- Parses an
Iriat compile time. - iri_ref
- Parses an
IriRefat compile time.
Structs§
- BTree
Bijection - Blank node identifier bijection between two (isomorphic) datasets.
- BTree
Dataset - BTree-based RDF dataset.
- BTree
Graph - BTree-based RDF graph.
- BlankId
- Blank node identifier.
- Blank
IdBuf - Owned blankid.
- CowLiteral
- Copy-on-write RDF literal.
- GenInterpretation
- Lexical interpretation based on a term generator.
- Ground
Terms Of - Iterator over the ground terms of a resource.
- IndexedB
Tree Dataset - Indexed BTree-based RDF dataset, optimized for pattern matching operations.
- IndexedB
Tree Graph - Indexed BTree-based RDF graph, optimized for pattern matching operations.
- Invalid
Blank Id - Invalid blankid error.
- Invalid
Iri - Invalid IRI error.
- Iri
- Uniform Resource Identifier (IRI).
- IriBuf
- Owned IRI.
- IriRef
- IRI reference.
- IriRef
Buf - Owned IRI reference.
- LangTag
- Any language tag (normal, private use or grandfathered).
- Lang
TagBuf - Owned langtag.
- Literal
- RDF Literal.
- Literal
Ref - RDF Literal reference.
- Quad
- RDF quad.
- Quad
Objects - Iterator over the objects of a dataset matching a given graph, subject and predicate.
- Quad
Predicates Objects - Iterator over the predicates of a dataset matching a given graph and subject, along with, for each predicate, the objects matching it.
- RdfDisplayed
- Value ready to be formatted as an RDF syntax element.
- Static
Domain - Trivial domain implementation that just fixes the resource type
R, without tracking any actual resource. - TermsOf
- Iterator over the terms of a resource.
- Triple
- RDF triple.
- Triple
Objects - Iterator over the objects of a graph matching a given subject and predicate.
- Triple
Predicates Objects - Iterator over the predicates of a graph matching a given subject, along with, for each predicate, the objects matching it.
- TryGround
Terms Of - Iterator over the ground terms of a resource.
- TryTerms
Of - Iterator over the terms of a resource.
- With
Generator - Combines any RDF interpretation with a node id generator.
Enums§
- Cow
- A clone-on-write smart pointer.
- CowGround
Term - Copy-on-write ground term.
- CowId
- Copy-on-write resource identifier.
- CowLiteral
Type - Owned or referenced RDF literal type.
- CowTerm
- Copy-on-write term.
- Ground
Term - Term excluding blank node identifiers.
- Ground
Term Ref - Ground term reference.
- Id
- Resource identifier.
- IdRef
- Resource identifier reference.
- IriError
- Literal
Type - RDF literal type.
- Literal
Type Ref - RDF literal type reference.
- Term
- Term.
- TermRef
- Term reference.
Constants§
- RDFS_
CLASS - http://www.w3.org/2000/01/rdf-schema#Class class IRI.
- RDFS_
COMMENT - http://www.w3.org/2000/01/rdf-schema#comment property IRI.
- RDFS_
CONTAINER - http://www.w3.org/2000/01/rdf-schema#Container class IRI.
- RDFS_
CONTAINER_ MEMBERSHIP_ PROPERTY - http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty class IRI.
- RDFS_
DATATYPE - http://www.w3.org/2000/01/rdf-schema#Datatype class IRI.
- RDFS_
DOMAIN - http://www.w3.org/2000/01/rdf-schema#domain property IRI.
- RDFS_
IS_ DEFINED_ BY - http://www.w3.org/2000/01/rdf-schema#isDefinedBy property IRI.
- RDFS_
LABEL - http://www.w3.org/2000/01/rdf-schema#label property IRI.
- RDFS_
LITERAL - http://www.w3.org/2000/01/rdf-schema#Literal class IRI.
- RDFS_
MEMBER - http://www.w3.org/2000/01/rdf-schema#member property IRI.
- RDFS_
RANGE - http://www.w3.org/2000/01/rdf-schema#range property IRI.
- RDFS_
RESOURCE - http://www.w3.org/2000/01/rdf-schema#Resource class IRI.
- RDFS_
SEE_ ALSO - http://www.w3.org/2000/01/rdf-schema#seeAlso property IRI.
- RDFS_
SUB_ CLASS_ OF - http://www.w3.org/2000/01/rdf-schema#subClassOf property IRI.
- RDFS_
SUB_ PROPERTY_ OF - http://www.w3.org/2000/01/rdf-schema#subPropertyOf property IRI.
- RDF_ALT
- http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt class IRI.
- RDF_BAG
- http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag class IRI.
- RDF_
FIRST - http://www.w3.org/1999/02/22-rdf-syntax-ns#first property IRI.
- RDF_
HTML - http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML datatype IRI.
- RDF_
JSON - http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON datatype IRI.
- RDF_
LANG_ STRING - http://www.w3.org/1999/02/22-rdf-syntax-ns#langString datatype IRI.
- RDF_
LIST - http://www.w3.org/1999/02/22-rdf-syntax-ns#List class IRI.
- RDF_NIL
- http://www.w3.org/1999/02/22-rdf-syntax-ns#nil individual IRI.
- RDF_
OBJECT - http://www.w3.org/1999/02/22-rdf-syntax-ns#object property IRI.
- RDF_
PREDICATE - http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate property IRI.
- RDF_
PROPERTY - http://www.w3.org/1999/02/22-rdf-syntax-ns#Property class IRI.
- RDF_
REST - http://www.w3.org/1999/02/22-rdf-syntax-ns#rest property IRI.
- RDF_SEQ
- http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq class IRI.
- RDF_
STATEMENT - http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement class IRI.
- RDF_
SUBJECT - http://www.w3.org/1999/02/22-rdf-syntax-ns#subject property IRI.
- RDF_
TYPE - http://www.w3.org/1999/02/22-rdf-syntax-ns#type property IRI.
- RDF_
VALUE - http://www.w3.org/1999/02/22-rdf-syntax-ns#value property IRI.
- RDF_
XML_ LITERAL - http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral datatype IRI.
- XSD_
STRING - http://www.w3.org/2001/XMLSchema#string datatype IRI.
Traits§
- Async
Const GenDomain - Domain that can spawn fresh new resources from a shared reference.
- Async
Dataset Mut - Async mutable dataset.
- Async
Finite Dataset - Async finite dataset.
- Async
Finite Domain - Asynchronous finite domain.
- Async
Finite Graph - Async finite graph.
- Async
GenDomain - Domain that can spawn fresh new resources.
- Async
Graph Mut - Async mutable graph.
- Async
Pattern Matching Dataset - Async pattern-matching-capable dataset.
- Async
Pattern Matching Graph - Async pattern-matching-capable graph.
- Const
GenDomain - Domain that can spawn fresh new resources from a shared reference.
- Dataset
- RDF dataset.
- Dataset
Mut - Mutable dataset.
- Domain
- RDF resource domain.
- Finite
Dataset - Dataset that can be traversed using a provided quad iterator.
- Finite
Domain - Finite domain.
- Finite
Graph - Graph that can be traversed using a provided triple iterator.
- GenDomain
- Domain that can spawn fresh new resources.
- Generator
- Lexical identifier generator.
- Graph
- RDF graph.
- Graph
Mut - Mutable graph.
- Ground
Interpretation - RDF ground resource interpretation.
- Ground
Interpretation Mut - Mutable ground interpretation, able to create new interpreted resources on demand.
- Interpretation
- RDF resource interpretation.
- Interpretation
Mut - Mutable resource interpretation, able to create new interpreted resources on demand.
- Multi
Pattern Matching Dataset - Multi-pattern-matching-capable dataset.
- Multi
Pattern Matching Graph - Multi-pattern-matching-capable graph.
- Named
Graph Finite Dataset - Dataset that can enumerate the distinct resources it uses to name a graph.
- Object
Finite Dataset - Dataset that can enumerate the distinct resources it uses as an object.
- Object
Finite Graph - Graph that can enumerate the distinct resources it uses as an object.
- Pattern
Matching Dataset - Pattern-matching-capable dataset.
- Pattern
Matching Dataset Mut - Pattern-matching-capable mutable dataset.
- Pattern
Matching Graph - Pattern-matching-capable graph.
- Pattern
Matching Graph Mut - Pattern-matching-capable mutable graph.
- Predicate
Finite Dataset - Dataset that can enumerate the distinct resources it uses as a predicate.
- Predicate
Finite Graph - Graph that can enumerate the distinct resources it uses as a predicate.
- RdfDisplay
- Display method for RDF syntax elements.
- Resource
Finite Dataset - Dataset that can enumerate the distinct resources it mentions (in any position of any quad).
- Resource
Finite Graph - Graph that can enumerate the distinct resources it mentions (in any position of any triple).
- Reverse
Ground Interpretation - Reverse ground interpretation, listing the ground lexical terms of a given resource.
- Reverse
Interpretation - Reverse resource interpretation, listing the lexical terms of a given resource.
- Subject
Finite Dataset - Dataset that can enumerate the distinct resources it uses as a subject.
- Subject
Finite Graph - Graph that can enumerate the distinct resources it uses as a subject.
- TryConst
GenDomain - Fallible domain that can spawn fresh new resources from a shared reference.
- TryDataset
- Fallible dataset.
- TryDataset
Mut - Fallible mutable dataset.
- TryDomain
- Fallible domain.
- TryFinite
Dataset - Fallible dataset that can be traversed using a provided quad iterator.
- TryFinite
Domain - Fallible finite domain.
- TryFinite
Graph - Fallible graph that can be traversed using a provided triple iterator.
- TryGen
Domain - Fallible domain that can spawn fresh new resources.
- TryGraph
- Fallible graph.
- TryGraph
Mut - Fallible mutable graph.
- TryGround
Interpretation - Fallible ground interpretation.
- TryGround
Interpretation Mut - Mutable fallible ground interpretation.
- TryInterpretation
- Fallible interpretation.
- TryInterpretation
Mut - Mutable fallible interpretation.
- TryPattern
Matching Dataset - Pattern-matching-capable fallible dataset.
- TryPattern
Matching Graph - Pattern-matching-capable fallible graph.
- TryReverse
Ground Interpretation - Fallible reverse ground interpretation.
- TryReverse
Interpretation - Fallible reverse interpretation.
Functions§
- are_
isomorphic - Checks that there is an isomorphism between the datasets
aandb. - find_
bijection - Finds a blank node identifier bijection from
atob. If such bijection exists, there is an isomorphism betweenaandb.
Type Aliases§
- Grdf
Quad - gRDF quad.
- Grdf
Quad Ref - gRDF quad reference.
- Grdf
Triple - gRDF triple.
- Grdf
Triple Ref - gRDF triple reference.
- RdfQuad
- Lexical RDF quad.
- RdfQuad
Ref - Lexical RDF quad reference.
- RdfTriple
- RDF triple.
- RdfTriple
Ref - RDF triple reference.