Expand description
Contains the RDF Funion’s term encodings.
§Overview
RDF term encodings allow us to bridge the gap between the Resource Description Framework and the Arrow type system. Because there is no single best way to represent RDF terms in Arrow, RDF Fusion supports multiple encodings. The documentation of the main crate provides some further details on this aspect.
The following table provides an overview of the supported encodings.
| Suitable For | Requirements | Term Identity | Comment | |
|---|---|---|---|---|
| String Encoding | Simplicity | - | Yes | |
| Plain Term | Processing literal terms | - | Yes | Result visible to users |
| Object ID | Joining solution sets | Object ID Mapping | Yes | Must be decoded at some point |
| Typed Family | Arithmetic and comparisons | - | No |
§Encoding Trait
All of the above encodings must implement the TermEncoding trait. As a result, each encoding must provide an EncodingArray and an EncodingScalar. These two types wrap regular Arrow arrays (or scalars) that adhere to a particular encoding. If you want to pass an array to a function that is guaranteed to be of a certain encoding, use these data types.
Modules§
- compute
- Contains computations that mostly map between different encodings.
- object_
id - plain_
term - string
- typed_
family
Structs§
- Quad
Storage Encoding Name Parser Error - RdfFusion
Encodings - Holds a configuration instance for each RDF Fusion encoding.
Enums§
- Downcast
Encoding Args - Represents a list of arrays that share the same encoding.
- Encoding
Datum - Represents either an array or a scalar for a given encoding.
- Encoding
Name - Represents the name of a single TermEncoding.
- Quad
Storage Encoding - Defines which encoding is used for retrieving quads from the storage.
- Quad
Storage Encoding Name - A version of
QuadStorageEncodingthat only reflects the name of the encoding.
Traits§
- Encoding
Array - Represents an Arrow Array with a specific TermEncoding.
- Encoding
Scalar - Represents an Arrow ScalarValue with a specific TermEncoding.
- Scalar
Encoder - Is responsible for encoding RDF terms (or NULL) in a particular encoding.
- Term
Decoder - Allows extracting an iterator of a type from an EncodingArray.
- Term
Encoder - Allows encoding an iterator of a type into an EncodingArray.
- Term
Encoding - A term encoding defines how RDF terms are represented in Arrow arrays.
Functions§
- detect_
encoding_ from_ types - Detects the encoding of the given argument types.
- quads_
to_ plain_ term_ dataframe - Creates a
DataFramefrom the given quads using the plain term encoding. - quads_
to_ plain_ term_ record_ batch - Creates a
RecordBatchfrom the given quads using the plain term encoding.