Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 6 additions & 37 deletions proto/rdf2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
11 changes: 8 additions & 3 deletions proto/sparql.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down