Crate rdf_types

Source
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 is a utility library providing common types, data-structures, traits, constants and macro definitions to deal with RDF data:

  • IRIs (through the iref crate), blank node identifiers and literals to represent resources in their lexical form as terms;
  • Triples and quads;
  • Interpretations projecting resources from the lexical domain to the value domain;
  • Graphs and datasets representing collections of interpreted triples/quads.

Re-exports§

pub use dataset::Dataset;
pub use generator::Generator;
pub use interpretation::Interpretation;
pub use interpretation::InterpretationMut;
pub use vocabulary::Vocabulary;
pub use vocabulary::VocabularyMut;

Modules§

dataset
Dataset traits and implementations.
generator
Resource identifier generators.
interpretation
Resource interpretations.
pattern
utils
vocabulary
Lexical domain abstractions.

Macros§

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.

Structs§

BlankId
Blank node identifier.
BlankIdBuf
Owned blank node identifier.
InvalidBlankId
Invalid blank node identifier.
Iri
Internationalized Resource Identifier (IRI).
IriBuf
Owned IRI.
Literal
RDF Literal.
LiteralRef
RDF Literal reference.
Quad
RDF quad.
RdfDisplayed
Value ready to be formatted as an RDF syntax element.
Triple
RDF triple.

Enums§

Id
RDF node identifier.
LexicalLiteralTypeRef
RDF literal type.
LiteralType
RDF literal type.
LiteralTypeRef
RDF literal type reference.
QuadExportFailed
Error returned when calling try_extract_from_vocabulary on a Quad.
Term
gRDF term.

Constants§

RDFS_CLASS
RDFS_COMMENT
RDFS_CONTAINER
RDFS_CONTAINER_MEMBERSHIP_PROPERTY
RDFS_DATATYPE
RDFS_DOMAIN
RDFS_IS_DEFINED_BY
RDFS_LABEL
RDFS_LITERAL
RDFS_MEMBER
RDFS_RANGE
RDFS_RESOURCE
RDFS_SEE_ALSO
RDFS_SUB_CLASS_OF
RDFS_SUB_PROPERTY_OF
RDF_ALT
RDF_BAG
RDF_FIRST
RDF_HTML
RDF_JSON
RDF_LANG_STRING
RDF_LIST
RDF_NIL
RDF_OBJECT
RDF_PREDICATE
RDF_PROPERTY
RDF_REST
RDF_SEQ
RDF_STATEMENT
RDF_SUBJECT
RDF_TYPE
RDF_VALUE
RDF_XML_LITERAL
XSD_STRING

Traits§

AsId
Type that can surely be borrowed as an Id.
AsRdfTerm
Type that can be interpreted as an RDF term.
FromBlankId
Types that can be constructed from a blank node identifier.
FromIri
Types that can be constructed from an iri.
IntoId
Type that can surely be converted into an Id.
IntoTerm
Type that can be turned into a Term.
IsXsdStringIri
IRI type that may be http://www.w3.org/2001/XMLSchema#string.
MaybeBlankId
Types that may represent a blank node identifier.
MaybeId
Types tha may represent a resource identifier.
MaybeIri
Types that may represent an iri.
RdfDisplay
Display method for RDF syntax elements.
RdfTypeIri
Literal type IRI.
RdfTypeIriWithContext
Literal type IRI.
TryAsBlankId
Types that may have a blank node identifier representation that can be borrowed.
TryAsId
Type that can be converted into an Id.
TryAsIri
Types that may have an iri representation that can be borrowed.
TryExportId
Type that can turn an Id<I, B> into an Id.
TryExportQuad
Type that can turn a Quad<S, P, O, G> into a Quad.
TryIntoBlankId
Types that can be turned into a blank node identifier.
TryIntoId
Type that can be converted into an Id.
TryIntoIri
Types that can be turned into an iri.

Type Aliases§

GraphLabel
RDF quad graph Label.
GrdfQuad
gRDF quad.
GrdfTriple
gRDF triple.
LexicalGraphLabelRef
Lexical RDF graph label reference.
LexicalIdRef
Lexical RDF node identifier reference.
LexicalObjectRef
Lexical RDF object reference.
LexicalQuad
Lexical RDF quad.
LexicalQuadRef
Lexical RDF quad reference.
LexicalSubjectRef
Lexical RDF subject reference.
LexicalTermRef
Lexical RDF term reference.
LexicalTriple
Lexical RDF triple.
LexicalTripleRef
Lexical RDF triple reference.
Object
RDF triple/quad object.
Subject
RDF triple/quad subject.