Quad-id manipulation. The wire format encodes a quad's coordinates
as a colon-separated string subjectId:predicateId:objectId:graphId.
These helpers construct and parse that form.
Recover the (subjectId, predicateId, objectId) triple from a
quad-id. Returns (0, 0, 0) for malformed input.
Splits on the first three colons only, so the graph component (which typically contains its own colons in IRIs/CURIEs) is correctly discarded rather than overflowing the parse.
Stub for SPARQL-result literal escaping. Currently a no-op;
present to mirror the JavaScript-side escapeQuotes slot.
Render any RDFterm as its canonical string id.
NamedNode iri → iriBlankNode bnId → "_:" ++ bnIdLiteralString s (Just lang) → "<s>@<lang>"LiteralString s Nothing → "<s>"LiteralDataType s (Just (DataType iri)) → "<s>^^<iri>"LiteralDataType s Nothing → "<s>"Predicate (PredicateNamedNode iri) → iriGraph DefaultGraph → ""Graph (QuadGraphNamedNode (IRIid iri)) → iri
Construct a quad-id from three integer ids and a
QuadGraph. Format:subjectId:predicateId:objectId:graphId. The graphId is""forDefaultGraphand the IRI forQuadGraphNamedNode.