Skip to content

Commit 3fbb75c

Browse files
Merge pull request #214 from simonvbrae/rdfstar-documentation
Adding documentation about RDF*
2 parents 5fc0b63 + 5ff3217 commit 3fbb75c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ It offers:
1212
[TriG](https://www.w3.org/TR/trig/),
1313
[N-Triples](https://www.w3.org/TR/n-triples/),
1414
[N-Quads](https://www.w3.org/TR/n-quads/),
15+
[RDF*](https://blog.liu.se/olafhartig/2019/01/10/position-statement-rdf-star-and-sparql-star/)
1516
and [Notation3 (N3)](https://www.w3.org/TeamSubmission/n3/)
1617
- [**Writing**](#writing) triples/quads to
1718
[Turtle](https://www.w3.org/TR/turtle/),
1819
[TriG](https://www.w3.org/TR/trig/),
1920
[N-Triples](https://www.w3.org/TR/n-triples/),
20-
and [N-Quads](https://www.w3.org/TR/n-quads/)
21+
[N-Quads](https://www.w3.org/TR/n-quads/)
22+
and [RDF*](https://blog.liu.se/olafhartig/2019/01/10/position-statement-rdf-star-and-sparql-star/)
2123
- [**Storage**](#storing) of triples/quads in memory
2224

2325
Parsing and writing is:
@@ -60,6 +62,8 @@ const myQuad = quad(
6062
literal('Ruben', 'en'),
6163
defaultGraph(),
6264
);
65+
console.log(myQuad.termType); // Quad
66+
console.log(myQuad.value); // ''
6367
console.log(myQuad.subject.value); // https://ruben.verborgh.org/profile/#me
6468
console.log(myQuad.object.value); // Ruben
6569
console.log(myQuad.object.datatype.value); // http://www.w3.org/1999/02/22-rdf-syntax-ns#langString
@@ -332,8 +336,16 @@ The N3.js parser and writer is fully compatible with the following W3C specifica
332336

333337
In addition, the N3.js parser also supports [Notation3 (N3)](https://www.w3.org/TeamSubmission/n3/) (no official specification yet).
334338

339+
The N3.js parser and writer are also fully compatible with the RDF* variants
340+
of the W3C specifications.
341+
342+
The default mode is permissive
343+
and allows a mixture of different syntaxes, including RDF*.
335344
Pass a `format` option to the constructor with the name or MIME type of a format
336345
for strict, fault-intolerant behavior.
346+
If a format string contains `star` or `*`
347+
(e.g., `turtlestar` or `TriG*`),
348+
RDF* support for that format will be enabled.
337349

338350
### Interface specifications
339351
The N3.js submodules are compatible with the following [RDF.js](http://rdf.js.org) interfaces:
@@ -348,6 +360,7 @@ The N3.js submodules are compatible with the following [RDF.js](http://rdf.js.or
348360
[`Variable`](http://rdf.js.org/data-model-spec/#variable-interface),
349361
[`DefaultGraph`](http://rdf.js.org/data-model-spec/#defaultgraph-interface)
350362
- the triples/quads it creates implement
363+
[`Term`](http://rdf.js.org/data-model-spec/#term-interface),
351364
[`Triple`](http://rdf.js.org/data-model-spec/#triple-interface)
352365
and
353366
[`Quad`](http://rdf.js.org/data-model-spec/#quad-interface)

0 commit comments

Comments
 (0)