Expand description
Streaming import path for RDF text sources → canonical .q42 volume.
Pipeline: a Rio parser on the main thread streams triples into a bounded channel; a pool of worker
shards hashes each triple into an NQuin and (in IngestMode::Complete) interns every
subject/predicate/object string into a per-shard lexicon; a collector gathers the quins; the main
thread merges the lexicon, sorts the quins by object hash, and writes the volume via
crate::q42_volume::UnifiedVolumeBuilder — the GOVERNING .q42 layout (160-byte SuperBlock
headers, block directory, BIDX object index, Merkle-DAG, and a real lexicon section).
History: this path previously wrote headerless LZ4 blocks and an empty lexicon, so
Q42Volume::read_all_quins could not read the graph back and all literal text was discarded while
the shrunk file was reported as “compression”. Both defects are fixed — see IngestMode.
Structs§
- RawTriple
- Represents a raw string-based Triple extracted from RDF/XML
Enums§
- Ingest
Mode - How much of the source graph the
.q42retains.
Functions§
- catalog_
base_ iri - Base IRI for relative terms / empty
xml:basein catalog RDF. - expand_
empty_ turtle_ prefixed_ names - Expand Turtle
prefix:empty local names (dc:,foaf:,ns1:) to IRIs. - streaming_
import_ rdf - Back-compat entry point: ingests losslessly (
IngestMode::Complete) — the honest default. - streaming_
import_ rdf_ volume_ set_ with_ mode - Stream-ingest RDF into a front-embedded logical volume root and immutable, size-capped child Q42 segments.
- streaming_
import_ rdf_ with_ mode - Stream-ingest an RDF source into a
.q42volume under an explicitIngestMode. - verify_
integrity