diff --git a/proto/rdf2.proto b/proto/rdf2.proto index c456e5e..6bc4442 100644 --- a/proto/rdf2.proto +++ b/proto/rdf2.proto @@ -6,7 +6,7 @@ package eu.ostrzyciel.jelly.core.proto.v1; // Messages shared by the newer Jelly formats, in preparation for the RDF 1.2 // version of Jelly. -// Packed entries of a lookup table. +// Packed entries of a lookup table (name, prefix, or datatype). // // Lookup entries are almost always assigned consecutive identifiers, because // that is what the "id = 0 means previous_id + 1" rule of the unpacked entries @@ -19,44 +19,13 @@ package eu.ostrzyciel.jelly.core.proto.v1; // following value takes the identifier of the previous one plus 1. // // A packed entry with no values at all is a no-op and must not be written. - -// Packed entries of the name lookup table -message RdfNameEntryPacked { - // 1-based identifier of the first value. - // If id=0, it should be interpreted as previous_id + 1. - // If id=0 appears in the first name entry of the stream, it should be - // interpreted as 1. - uint32 id = 1; - // Values of the names (UTF-8 encoded), for consecutive identifiers - // starting at id. - repeated string values = 2; -} - -// Packed entries of the prefix lookup table -// -// Note: the prefixes in the lookup table can be arbitrary strings, and are -// NOT meant to be user-facing. They are only used for IRI compression. -// To transmit user-facing namespace declarations for cosmetic purposes, use -// RdfNamespaceDeclaration. -message RdfPrefixEntryPacked { - // 1-based identifier of the first value. - // If id=0, it should be interpreted as previous_id + 1. - // If id=0 appears in the first prefix entry of the stream, it should be - // interpreted as 1. - uint32 id = 1; - // Values of the prefixes (UTF-8 encoded), for consecutive identifiers - // starting at id. - repeated string values = 2; -} - -// Packed entries of the datatype lookup table -message RdfDatatypeEntryPacked { +message RdfLookupEntryPacked { // 1-based identifier of the first value. // If id=0, it should be interpreted as previous_id + 1. - // If id=0 appears in the first datatype entry of the stream, it should be - // interpreted as 1. + // If id=0 appears in the first entry of a given lookup table in the + // stream, it should be interpreted as 1. uint32 id = 1; - // Values of the datatypes (UTF-8 encoded), for consecutive identifiers - // starting at id. + // Values of the lookup entries (UTF-8 encoded), for consecutive + // identifiers starting at id. repeated string values = 2; } diff --git a/proto/sparql.proto b/proto/sparql.proto index 573d66f..9c7820d 100644 --- a/proto/sparql.proto +++ b/proto/sparql.proto @@ -259,11 +259,16 @@ message SparqlResultsFrame { // frame's columns must still hold the intended value after all entries are // applied: the working set of a single frame must fit in the lookup // tables. - repeated RdfNameEntryPacked names = 4; + repeated RdfLookupEntryPacked names = 4; // Entries in the prefix lookup table. See `names` for ordering rules. - repeated RdfPrefixEntryPacked prefixes = 5; + // + // Note: the prefixes in the lookup table can be arbitrary strings, and are + // NOT meant to be user-facing. They are only used for IRI compression. + // To transmit user-facing namespace declarations for cosmetic purposes, use + // RdfNamespaceDeclaration. + repeated RdfLookupEntryPacked prefixes = 5; // Entries in the datatype lookup table. See `names` for ordering rules. - repeated RdfDatatypeEntryPacked datatypes = 6; + repeated RdfLookupEntryPacked datatypes = 6; // IRI columns. repeated SparqlIriColumn iri_columns = 7; // Blank node columns.