pub struct QuotedTriplesSignal {
pub present: bool,
pub export_surfaces: Vec<String>,
pub export_default: Option<String>,
}Expand description
Whether the file contains quoted triples — statements standing inside other statements — and, if it does, what a consumer gets when they export it.
This is the question “will I meet triple terms in this dataset, and in which
spelling?”, which a consumer needs answered before they download a 50 GB
file and run rete export on it. The two surfaces are not interchangeable
downstream: an RDF 1.2 parser rejects <<s p o>> in N-Quads and silently
reads it as a reifier in Turtle/TriG, and an RDF-star parser rejects
<<( s p o )>> everywhere. Which one a dump carries decides whether it loads
at all, so it belongs in the card rather than in the reader’s memory of a CLI
flag.
Measured at read time from the header, never stored, exactly like
TextIndexSignal and PermutationsSignal, and for the sharpest version
of the same reason: header flag bit 2 (FLAG_HAS_QUOTED_TRIPLES) has been
written by every build since quoted triples were supported, so this is an
honest answer for every file that already exists — the 44 published
datasets included — with no re-card and no rebuild. A stored copy would be
null on all of them, which is worse than nothing: it would assert
“unknown” about files whose own header knows.
None therefore means unknown — a card read out of a saved JSON
document, with no file to measure — and never “no quoted triples”.
There is deliberately no count. The header carries presence, not cardinality, and counting would mean decoding the dictionary — outside the CARD tier’s budget (header + metadata, never the dictionary), and available only to files built after this existed, which is the failure mode above.
Fields§
§present: boolDoes the file hold at least one quoted triple as a dictionary term?
export_surfaces: Vec<String>The surfaces rete export can write them in, most interoperable first.
Empty when present is false: the question does not arise.
export_default: Option<String>Which of export_surfaces rete export writes with no flag. None
when present is false.
Implementations§
Source§impl QuotedTriplesSignal
impl QuotedTriplesSignal
Sourcepub fn probe(header: &Header) -> QuotedTriplesSignal
pub fn probe(header: &Header) -> QuotedTriplesSignal
Read it straight off the parsed header — flag bit 2, in the 1 KiB every card read has already fetched. No range read of any kind.
Trait Implementations§
Source§impl Clone for QuotedTriplesSignal
impl Clone for QuotedTriplesSignal
Source§fn clone(&self) -> QuotedTriplesSignal
fn clone(&self) -> QuotedTriplesSignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more