Skip to content

Commit 0337ed8

Browse files
committed
chore: rename RDF* -> RDF-star
1 parent 0ac4c46 commit 0337ed8

7 files changed

Lines changed: 79 additions & 79 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +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/)
15+
[RDF-star](https://blog.liu.se/olafhartig/2019/01/10/position-statement-rdf-star-and-sparql-star/)
1616
and [Notation3 (N3)](https://www.w3.org/TeamSubmission/n3/)
1717
- [**Writing**](#writing) triples/quads to
1818
[Turtle](https://www.w3.org/TR/turtle/),
1919
[TriG](https://www.w3.org/TR/trig/),
2020
[N-Triples](https://www.w3.org/TR/n-triples/),
2121
[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/)
22+
and [RDF-star](https://blog.liu.se/olafhartig/2019/01/10/position-statement-rdf-star-and-sparql-star/)
2323
- [**Storage**](#storing) of triples/quads in memory
2424

2525
Parsing and writing is:
@@ -358,16 +358,16 @@ The N3.js parser and writer is fully compatible with the following W3C specifica
358358

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

361-
The N3.js parser and writer are also fully compatible with the RDF* variants
361+
The N3.js parser and writer are also fully compatible with the RDF-star variants
362362
of the W3C specifications.
363363

364364
The default mode is permissive
365-
and allows a mixture of different syntaxes, including RDF*.
365+
and allows a mixture of different syntaxes, including RDF-star.
366366
Pass a `format` option to the constructor with the name or MIME type of a format
367367
for strict, fault-intolerant behavior.
368368
If a format string contains `star` or `*`
369369
(e.g., `turtlestar` or `TriG*`),
370-
RDF* support for that format will be enabled.
370+
RDF-star support for that format will be enabled.
371371

372372
### Interface specifications
373373
The N3.js submodules are compatible with the following [RDF.js](http://rdf.js.org) interfaces:

src/N3DataFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export function termToId(term) {
247247
term.language ? `@${term.language}` :
248248
(term.datatype && term.datatype.value !== xsd.string ? `^^${term.datatype.value}` : '')}`;
249249
case 'Quad':
250-
// To identify RDF* quad components, we escape quotes by doubling them.
250+
// To identify RDF-star quad components, we escape quotes by doubling them.
251251
// This avoids the overhead of backslash parsing of Turtle-like syntaxes.
252252
return `<<${
253253
escapeQuotes(termToId(term.subject))

src/N3Parser.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default class N3Parser {
243243
break;
244244
case '<<':
245245
if (!this._supportsRDFStar)
246-
return this._error('Unexpected RDF* syntax', token);
246+
return this._error('Unexpected RDF-star syntax', token);
247247
this._saveContext('<<', this._graph, null, null, null);
248248
this._graph = null;
249249
return this._readSubject;
@@ -336,7 +336,7 @@ export default class N3Parser {
336336
return this._readSubject;
337337
case '<<':
338338
if (!this._supportsRDFStar)
339-
return this._error('Unexpected RDF* syntax', token);
339+
return this._error('Unexpected RDF-star syntax', token);
340340
this._saveContext('<<', this._graph, this._subject, this._predicate, null);
341341
this._graph = null;
342342
return this._readSubject;
@@ -486,7 +486,7 @@ export default class N3Parser {
486486
return this._readSubject;
487487
case '<<':
488488
if (!this._supportsRDFStar)
489-
return this._error('Unexpected RDF* syntax', token);
489+
return this._error('Unexpected RDF-star syntax', token);
490490

491491
this._saveContext('<<', this._graph, this._subject, null, null);
492492
return this._readSubject;
@@ -637,7 +637,7 @@ export default class N3Parser {
637637
break;
638638
case '{|':
639639
if (!this._supportsRDFStar)
640-
return this._error('Unexpected RDF* syntax', token);
640+
return this._error('Unexpected RDF-star syntax', token);
641641

642642
this._saveContext('{|', this._graph, this._subject, this._predicate, this._object);
643643

@@ -867,7 +867,7 @@ export default class N3Parser {
867867
return this._readPath;
868868
}
869869

870-
// ### `_readRDFStarTail` reads the end of a nested RDF* triple
870+
// ### `_readRDFStarTail` reads the end of a nested RDF-star triple
871871
_readRDFStarTail(token) {
872872
if (token.type !== '>>')
873873
return this._error(`Expected >> to follow "${this._object.id}" but got ${token.type}`, token);
@@ -894,7 +894,7 @@ export default class N3Parser {
894894
}
895895
}
896896

897-
// ### `_readRDFStarTail` reads the end of a nested RDF* triple
897+
// ### `_readRDFStarTail` reads the end of a nested RDF-star triple
898898
_readAnnotatedTail(token) {
899899
if (token.type === '{|') {
900900
this._saveContext('{|', this._graph, this._subject, this._predicate, this._object);

src/N3Writer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export default class N3Writer {
225225
}
226226
}
227227

228-
// ### `_encodeQuad` encodes an RDF* quad
228+
// ### `_encodeQuad` encodes an RDF-star quad
229229
_encodeQuad({ subject, predicate, object, graph }) {
230230
return `<<${
231231
this._encodeSubject(subject)} ${

test/N3Lexer-test.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ describe('Lexer', () => {
855855
{ type: '>>', line: 1 },
856856
{ type: 'eof', line: 1 }));
857857

858-
it('should tokenize an RDF* statement with IRIs',
858+
it('should tokenize an RDF-star statement with IRIs',
859859
shouldTokenize('<<<http://ex.org/?bla#foo> \n\t<http://ex.org/?bla#bar> \n\t<http://ex.org/?bla#boo>>> .',
860860
{ type: '<<', line: 1 },
861861
{ type: 'IRI', value: 'http://ex.org/?bla#foo', line: 1 },
@@ -865,7 +865,7 @@ describe('Lexer', () => {
865865
{ type: '.', line: 3 },
866866
{ type: 'eof', line: 3 }));
867867

868-
it('should not tokenize a wrongly closed RDF* statement with IRIs',
868+
it('should not tokenize a wrongly closed RDF-star statement with IRIs',
869869
shouldNotTokenize('<<<http://ex.org/?bla#foo> \n\t<http://ex.org/?bla#bar> \n\t<http://ex.org/?bla#boo>> .',
870870
'Unexpected ">" on line 3.'));
871871

@@ -915,7 +915,7 @@ describe('Lexer', () => {
915915
shouldNotTokenize('<a> <b> <c> {| <d> [ <e> "f" ]; <f> <g> |',
916916
'Unexpected "|" on line 1.'));
917917

918-
it('should tokenize a split RDF* statement with IRIs',
918+
it('should tokenize a split RDF-star statement with IRIs',
919919
shouldTokenize(streamOf('<', '<<http://ex.org/?bla#foo> \n\t<http://ex.org/?bla#bar> \n\t<http://ex.org/?bla#boo>>> .'),
920920
{ type: '<<', line: 1 },
921921
{ type: 'IRI', value: 'http://ex.org/?bla#foo', line: 1 },
@@ -925,7 +925,7 @@ describe('Lexer', () => {
925925
{ type: '.', line: 3 },
926926
{ type: 'eof', line: 3 }));
927927

928-
it('should tokenize an RDF* statement with string literals',
928+
it('should tokenize an RDF-star statement with string literals',
929929
shouldTokenize('<<"string"@en "string"@nl-be "string"@EN>> .',
930930
{ type: '<<', line: 1 },
931931
{ type: 'literal', value: 'string', line: 1 },
@@ -938,7 +938,7 @@ describe('Lexer', () => {
938938
{ type: '.', line: 1 },
939939
{ type: 'eof', line: 1 }));
940940

941-
it('should tokenize an RDF* statement with integers',
941+
it('should tokenize an RDF-star statement with integers',
942942
shouldTokenize('<<1 2 3>>.',
943943
{ type: '<<', line: 1 },
944944
{ type: 'literal', value: '1', prefix: 'http://www.w3.org/2001/XMLSchema#integer', line: 1 },
@@ -948,7 +948,7 @@ describe('Lexer', () => {
948948
{ type: '.', line: 1 },
949949
{ type: 'eof', line: 1 }));
950950

951-
it('should tokenize an RDF* statement with decimals',
951+
it('should tokenize an RDF-star statement with decimals',
952952
shouldTokenize('<<1.2 3.4 5.6>>.',
953953
{ type: '<<', line: 1 },
954954
{ type: 'literal', value: '1.2', prefix: 'http://www.w3.org/2001/XMLSchema#decimal', line: 1 },
@@ -958,7 +958,7 @@ describe('Lexer', () => {
958958
{ type: '.', line: 1 },
959959
{ type: 'eof', line: 1 }));
960960

961-
it('should tokenize an RDF* statement with booleans',
961+
it('should tokenize an RDF-star statement with booleans',
962962
shouldTokenize('<<true false true>>.',
963963
{ type: '<<', line: 1 },
964964
{ type: 'literal', value: 'true', prefix: 'http://www.w3.org/2001/XMLSchema#boolean', line: 1 },
@@ -975,7 +975,7 @@ describe('Lexer', () => {
975975
{ type: '.', line: 1 },
976976
{ type: 'eof', line: 1 }));
977977

978-
it('should tokenize an RDF* statement with prefixed names',
978+
it('should tokenize an RDF-star statement with prefixed names',
979979
shouldTokenize('<<a:a b:b c:c>> .',
980980
{ type: '<<', line: 1 },
981981
{ type: 'prefixed', prefix: 'a', value: 'a', line: 1 },
@@ -985,7 +985,7 @@ describe('Lexer', () => {
985985
{ type: '.', line: 1 },
986986
{ type: 'eof', line: 1 }));
987987

988-
it('should tokenize an RDF* statement with blank nodes',
988+
it('should tokenize an RDF-star statement with blank nodes',
989989
shouldTokenize('<<_:a _:b _:c>> .',
990990
{ type: '<<', line: 1 },
991991
{ type: 'blank', prefix: '_', value: 'a', line: 1 },
@@ -995,7 +995,7 @@ describe('Lexer', () => {
995995
{ type: '.', line: 1 },
996996
{ type: 'eof', line: 1 }));
997997

998-
it('should tokenize an RDF* statement with variables',
998+
it('should tokenize an RDF-star statement with variables',
999999
shouldTokenize('<<?a ?b ?c>> .',
10001000
{ type: '<<', line: 1 },
10011001
{ type: 'var', value: '?a', line: 1 },
@@ -1005,7 +1005,7 @@ describe('Lexer', () => {
10051005
{ type: '.', line: 1 },
10061006
{ type: 'eof', line: 1 }));
10071007

1008-
it('should tokenize an RDF* statement with mixed types',
1008+
it('should tokenize an RDF-star statement with mixed types',
10091009
shouldTokenize('<<<http://ex.org/?bla#foo> "string"@nl-be c:c>> .',
10101010
{ type: '<<', line: 1 },
10111011
{ type: 'IRI', value: 'http://ex.org/?bla#foo', line: 1 },
@@ -1016,7 +1016,7 @@ describe('Lexer', () => {
10161016
{ type: '.', line: 1 },
10171017
{ type: 'eof', line: 1 }));
10181018

1019-
it('should tokenize an RDF* statement with mixed types',
1019+
it('should tokenize an RDF-star statement with mixed types',
10201020
shouldTokenize('<<_:a a:a "string"@EN>> .',
10211021
{ type: '<<', line: 1 },
10221022
{ type: 'blank', prefix: '_', value: 'a', line: 1 },
@@ -1027,7 +1027,7 @@ describe('Lexer', () => {
10271027
{ type: '.', line: 1 },
10281028
{ type: 'eof', line: 1 }));
10291029

1030-
it('should tokenize an RDF* statement with mixed types',
1030+
it('should tokenize an RDF-star statement with mixed types',
10311031
shouldTokenize('<<"literal"@AU <http://ex.org/?bla#foo> _:a>> .',
10321032
{ type: '<<', line: 1 },
10331033
{ type: 'literal', value: 'literal', line: 1 },
@@ -1038,7 +1038,7 @@ describe('Lexer', () => {
10381038
{ type: '.', line: 1 },
10391039
{ type: 'eof', line: 1 }));
10401040

1041-
it('should tokenize RDF* statements with shared subjects',
1041+
it('should tokenize RDF-star statements with shared subjects',
10421042
shouldTokenize('<<<a> <b> <c>;\n<d> <e>>>.',
10431043
{ type: '<<', line: 1 },
10441044
{ type: 'IRI', value: 'a', line: 1 },
@@ -1051,7 +1051,7 @@ describe('Lexer', () => {
10511051
{ type: '.', line: 2 },
10521052
{ type: 'eof', line: 2 }));
10531053

1054-
it('should tokenize RDF* statements with shared subjects and predicates',
1054+
it('should tokenize RDF-star statements with shared subjects and predicates',
10551055
shouldTokenize('<<<a> <b> <c>,\n<d>>>.',
10561056
{ type: '<<', line: 1 },
10571057
{ type: 'IRI', value: 'a', line: 1 },
@@ -1063,7 +1063,7 @@ describe('Lexer', () => {
10631063
{ type: '.', line: 2 },
10641064
{ type: 'eof', line: 2 }));
10651065

1066-
it('should tokenize an RDF* statement with shared subjects and predicates and prefixed names',
1066+
it('should tokenize an RDF-star statement with shared subjects and predicates and prefixed names',
10671067
shouldTokenize('<<a:a b:b c:c;d:d e:e,f:f>> .',
10681068
{ type: '<<', line: 1 },
10691069
{ type: 'prefixed', prefix: 'a', value: 'a', line: 1 },

0 commit comments

Comments
 (0)