Skip to main content

Module builder

Module builder 

Source
Expand description

Jena Assembler document parser.

Converts a Turtle-format Jena Assembler document (or a pre-expanded set of string triples) into an AssemblerConfig value.

§Design

The implementation has two layers:

  1. AssemblerBuilder::from_triples — the core graph-walking logic. Accepts (subject, predicate, object) string tuples (IRIs and literals in N-Triples-like form, already expanded), and produces the config. This is the primary testing seam: it works without any external parser.

  2. AssemblerBuilder::from_turtle — uses oxttl (already a workspace dep) to parse Turtle into oxrdf::Triple values, then converts each triple into a string tuple and delegates to from_triples.

§Triple representation for from_triples

Subjects and objects that are IRIs are stored as bare IRI strings (e.g. "http://example.org/ds"). Blank nodes are stored with a leading "_:" sigil (e.g. "_:b0"). Literal objects are stored with their N-Triples quotation (e.g. "\"/data/db\"" or "\"hello\"^^<xsd:string>"). The builder strips the surrounding double-quotes when it extracts literal values.

Structs§

AssemblerBuilder
Parses Jena Assembler documents into AssemblerConfig values.

Enums§

AssemblerError
Errors produced by the Jena Assembler parser.