Skip to content

Commit

Permalink
Updates N-Triples tests to use triple term syntax (#134)
Browse files Browse the repository at this point in the history
* Updates N-Tripes tests to use triple term syntax instead of quoted triples.
  • Loading branch information
gkellogg authored Mar 21, 2024
1 parent 60520d3 commit 448a612
Show file tree
Hide file tree
Showing 19 changed files with 154 additions and 127 deletions.
178 changes: 99 additions & 79 deletions rdf/rdf12/rdf-n-triples/syntax/index.html

Large diffs are not rendered by default.

73 changes: 41 additions & 32 deletions rdf/rdf12/rdf-n-triples/syntax/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ trs:manifest rdf:type mf:Manifest ;
trs:ntriples-star-1
trs:ntriples-star-2
trs:ntriples-star-3
trs:ntriples-star-4
trs:ntriples-star-5

trs:ntriples-star-bnode-1
trs:ntriples-star-bnode-2

trs:ntriples-star-nested-1
trs:ntriples-star-nested-2

trs:ntriples-base-1
trs:ntriples-base-2
Expand All @@ -44,6 +40,12 @@ trs:manifest rdf:type mf:Manifest ;
trs:ntriples-star-bad-2
trs:ntriples-star-bad-3
trs:ntriples-star-bad-4
trs:ntriples-star-bad-5

trs:ntriples-star-bad-quoted-1
trs:ntriples-star-bad-quoted-2
trs:ntriples-star-bad-quoted-3
trs:ntriples-star-bad-quoted-4

trs:ntriples-star-bnode-bad-annotated-syntax-1
trs:ntriples-star-bnode-bad-annotated-syntax-2
Expand All @@ -55,52 +57,34 @@ trs:manifest rdf:type mf:Manifest ;
) .

trs:ntriples-star-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - subject quoted triple" ;
mf:name "N-Triples-star - triple term" ;
mf:action <ntriples-star-syntax-1.nt> ;
.

trs:ntriples-star-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - object quoted triple" ;
mf:name "N-Triples-star - whitespace and terms" ;
mf:action <ntriples-star-syntax-2.nt> ;
.

trs:ntriples-star-3 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - subject and object quoted triples" ;
mf:action <ntriples-star-syntax-3.nt> ;
.

trs:ntriples-star-4 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - whitespace and terms" ;
mf:action <ntriples-star-syntax-4.nt> ;
.

trs:ntriples-star-5 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - Nested, no whitespace" ;
mf:action <ntriples-star-syntax-5.nt> ;
mf:action <ntriples-star-syntax-3.nt> ;
.

# Blank nodes

trs:ntriples-star-bnode-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - Blank node subject" ;
mf:name "N-Triples-star - Blank node object" ;
mf:action <ntriples-star-bnode-1.nt> ;
.

trs:ntriples-star-bnode-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - Blank node object" ;
mf:action <ntriples-star-bnode-2.nt> ;
.
# Nesting

trs:ntriples-star-nested-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - Nested subject term" ;
mf:name "N-Triples-star - Nested term" ;
mf:action <ntriples-star-nested-1.nt> ;
.

trs:ntriples-star-nested-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
mf:name "N-Triples-star - Nested object term" ;
mf:action <ntriples-star-nested-2.nt> ;
.

# Base direction

trs:ntriples-base-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
Expand All @@ -116,25 +100,50 @@ trs:ntriples-base-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
## Bad syntax

trs:ntriples-star-bad-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triple as predicate" ;
mf:name "N-Triples-star - Bad - triple term as predicate" ;
mf:action <ntriples-star-bad-syntax-1.nt> ;
.

trs:ntriples-star-bad-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triple, literal subject" ;
mf:name "N-Triples-star - Bad - triple term, literal subject" ;
mf:action <ntriples-star-bad-syntax-2.nt> ;
.

trs:ntriples-star-bad-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triple, literal predicate" ;
mf:name "N-Triples-star - Bad - triple term, literal predicate" ;
mf:action <ntriples-star-bad-syntax-3.nt> ;
.

trs:ntriples-star-bad-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triple, blank node predicate" ;
mf:name "N-Triples-star - Bad - triple term, blank node predicate" ;
mf:action <ntriples-star-bad-syntax-4.nt> ;
.

trs:ntriples-star-bad-5 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - triple term as subject" ;
mf:action <ntriples-star-bad-syntax-5.nt> ;
.

trs:ntriples-star-bad-quoted-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - subject quoted triple" ;
mf:action <ntriples-star-bad-quoted-syntax-1.nt> ;
.

trs:ntriples-star-bad-quoted-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - object quoted triple" ;
mf:action <ntriples-star-bad-quoted-syntax-2.nt> ;
.

trs:ntriples-star-bad-quoted-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - subject and object quoted triples" ;
mf:action <ntriples-star-bad-quoted-syntax-3.nt> ;
.

trs:ntriples-star-bad-quoted-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triples whitespace and terms" ;
mf:action <ntriples-star-bad-quoted-syntax-4.nt> ;
.

# Annotation syntax is not permitted in nt

trs:ntriples-star-bnode-bad-annotated-syntax-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<http://example/a> << <http://example/s> <http://example/p> <http://example/o> >> <http://example/z> .
<http://example/a> <<( <http://example/s> <http://example/p> <http://example/o> )>> <http://example/z> .
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<< "XYZ" <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
<http://example/q> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( "XYZ" <http://example/p> <http://example/o> )>> .
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<< <http://example/s> "XYZ" <http://example/o> >> <http://example/q> <http://example/z> .
<http://example/q> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( <http://example/s> "XYZ" <http://example/o> )>> .
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<< <http://example/s> _:label <http://example/o> >> <http://example/q> <http://example/z> .
<http://example/q> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> << <http://example/s> _:label <http://example/o> >> .
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<<( <http://example/s> <http://example/p> <http://example/o> )>> <http://example/a> <http://example/z> .
2 changes: 1 addition & 1 deletion rdf/rdf12/rdf-n-triples/syntax/ntriples-star-bnode-1.nt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
_:b0 <http://example/p> <http://example/o> .
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( _:b0 <http://example/p> <http://example/o> )>> .
2 changes: 0 additions & 2 deletions rdf/rdf12/rdf-n-triples/syntax/ntriples-star-bnode-2.nt

This file was deleted.

4 changes: 2 additions & 2 deletions rdf/rdf12/rdf-n-triples/syntax/ntriples-star-nested-1.nt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<http://example/s> <http://example/p> <http://example/o> .
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( <http://example/s1> <http://example/p1> <http://example/o1> )>> .
<http://example/r> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( <http://example/23> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( <http://example/s3> <http://example/p3> <http://example/o3> )>> )>> .
3 changes: 0 additions & 3 deletions rdf/rdf12/rdf-n-triples/syntax/ntriples-star-nested-2.nt

This file was deleted.

2 changes: 1 addition & 1 deletion rdf/rdf12/rdf-n-triples/syntax/ntriples-star-syntax-1.nt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
<http://example/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies> <<( <http://example/s> <http://example/p> <http://example/o> )>> .
2 changes: 1 addition & 1 deletion rdf/rdf12/rdf-n-triples/syntax/ntriples-star-syntax-2.nt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
<http://example/s><http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies><<(<http://example/s2><http://example/p2><http://example/o2>)>>.
2 changes: 1 addition & 1 deletion rdf/rdf12/rdf-n-triples/syntax/ntriples-star-syntax-3.nt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
<http://example/s><http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies><<(<http://example/s2><http://example/q2><<(<http://example/s3><http://example/p3><http://example/o3>)>>)>>.
1 change: 0 additions & 1 deletion rdf/rdf12/rdf-n-triples/syntax/ntriples-star-syntax-4.nt

This file was deleted.

0 comments on commit 448a612

Please sign in to comment.