diff --git a/docs/assets/samples/foaf.jelly b/docs/assets/samples/foaf.jelly new file mode 100644 index 0000000..df9b1c1 Binary files /dev/null and b/docs/assets/samples/foaf.jelly differ diff --git a/docs/assets/samples/foaf.jelly.txt b/docs/assets/samples/foaf.jelly.txt new file mode 100644 index 0000000..97bb1ea --- /dev/null +++ b/docs/assets/samples/foaf.jelly.txt @@ -0,0 +1,189 @@ +# Frame 0 +rows { + options { + physical_type: PHYSICAL_STREAM_TYPE_TRIPLES + max_name_table_size: 4000 + max_prefix_table_size: 150 + max_datatype_table_size: 32 + logical_type: LOGICAL_STREAM_TYPE_FLAT_TRIPLES + version: 1 + } +} +rows { + prefix { + value: "https://neverblink.eu/example#" + } +} +rows { + name { + value: "Piotr" + } +} +rows { + prefix { + value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" + } +} +rows { + name { + value: "type" + } +} +rows { + prefix { + value: "http://xmlns.com/foaf/0.1/" + } +} +rows { + name { + value: "Person" + } +} +rows { + triple { + s_iri { + prefix_id: 1 + } + p_iri { + prefix_id: 2 + } + o_iri { + prefix_id: 3 + } + } +} +rows { + prefix { + value: "https://schema.org/" + } +} +rows { + triple { + o_iri { + prefix_id: 4 + name_id: 3 + } + } +} +rows { + name { + value: "givenName" + } +} +rows { + triple { + p_iri { + prefix_id: 3 + } + o_literal { + lex: "Piotr" + } + } +} +rows { + name { + value: "familyName" + } +} +rows { + triple { + p_iri { + } + o_literal { + lex: "Sowi\305\204ski" + } + } +} +rows { + name { + value: "homepage" + } +} +rows { + prefix { + value: "https://" + } +} +rows { + name { + value: "ostrzyciel.eu" + } +} +rows { + triple { + p_iri { + } + o_iri { + prefix_id: 5 + } + } +} +rows { + name { + value: "Organization" + } +} +rows { + triple { + s_bnode: "0000" + p_iri { + prefix_id: 2 + name_id: 2 + } + o_iri { + prefix_id: 4 + name_id: 8 + } + } +} +rows { + name { + value: "name" + } +} +rows { + triple { + p_iri { + } + o_literal { + lex: "NeverBlink" + } + } +} +rows { + name { + value: "url" + } +} +rows { + name { + value: "neverblink.eu" + } +} +rows { + triple { + p_iri { + } + o_iri { + prefix_id: 5 + } + } +} +rows { + name { + value: "worksFor" + } +} +rows { + triple { + s_iri { + prefix_id: 1 + name_id: 1 + } + p_iri { + prefix_id: 4 + name_id: 12 + } + o_bnode: "0000" + } +} diff --git a/docs/assets/samples/foaf.ttl b/docs/assets/samples/foaf.ttl new file mode 100644 index 0000000..efab0b2 --- /dev/null +++ b/docs/assets/samples/foaf.ttl @@ -0,0 +1,13 @@ +PREFIX foaf: +PREFIX schema: +PREFIX : + +:Piotr a foaf:Person , schema:Person ; + foaf:givenName "Piotr" ; + foaf:familyName "Sowiński" ; + foaf:homepage ; + schema:worksFor [ + a schema:Organization ; + schema:name "NeverBlink" ; + schema:url + ] . diff --git a/docs/use-cases.md b/docs/use-cases.md index 539abf1..60131ed 100644 --- a/docs/use-cases.md +++ b/docs/use-cases.md @@ -45,6 +45,11 @@ Below listed are some example datasets available in the Jelly format. All of these are in the [delimited format](user-guide.md#delimited-vs-non-delimited-jelly). The licenses for these datasets are specified on the linked documentation pages. +- Toy dataset (starting example – `foaf.jelly`): + - [:octicons-download-24: foaf.jelly](assets/samples/foaf.jelly) + - [:octicons-download-24: foaf.ttl](assets/samples/foaf.ttl) – same file in the Turtle format. + - [:octicons-download-24: foaf.jelly.txt](assets/samples/foaf.jelly.txt) – text representation of the Jelly file, for debugging purposes. + - Large datasets (millions of triples/quads): - [:octicons-download-24: ASSIST-IoT weather measurements](https://w3id.org/riverbench/datasets/assist-iot-weather/1.0.3/files/jelly_full.jelly.gz) ([documentation](https://w3id.org/riverbench/datasets/assist-iot-weather/1.0.3)) – 80 million triples. - [:octicons-download-24: 5 million nanopublications](https://w3id.org/riverbench/datasets/nanopubs/1.0.3/files/jelly_full.jelly.gz) ([documentation](https://w3id.org/riverbench/datasets/nanopubs/1.0.3)) – 171 million quads. diff --git a/docs/user-guide.md b/docs/user-guide.md index ed06866..0168eb9 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -444,6 +444,16 @@ You can read more about how this works in the [serialization format specificatio - [Jelly-JVM]({{ jvm_link() }}) supports both variants, but uses them in different contexts. When writing to a Java byte stream (typically a file) with Apache Jena RIOT or RDF4J Rio, the delimited variant is used. However, the RIOT/Rio integrations can parse either delimited or non-delimited Jelly data. In the gRPC protocol, the non-delimited variant is used. - [RiverBench](http://w3id.org/riverbench) publishes its RDF metadata and datasets as Jelly files. These files are always written using the delimited variant. +## Sample files + +`foaf.jelly` is a simple Jelly file that may be useful when trying to understand how the format works. You can download it here: + +- [:octicons-download-24: foaf.jelly](assets/samples/foaf.jelly) +- [:octicons-download-24: foaf.ttl](assets/samples/foaf.ttl) – same file in the Turtle format. +- [:octicons-download-24: foaf.jelly.txt](assets/samples/foaf.jelly.txt) – text representation of the Jelly file, for debugging purposes. + +You can find more example datasets (including ones with millions of triples) **[on this page](use-cases.md#example-datasets-in-the-jelly-format)**. The [conformance test cases](conformance/rdf-test-cases.md) contain dozens of valid Jelly files testing all features of the format. + ## Implementing Jelly !!! note