Skip to content

Commit d9e5727

Browse files
committed
Add extracted examples.
1 parent 2db0cf1 commit d9e5727

File tree

50 files changed

+716
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+716
-8
lines changed

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ GEM
2020
hamster (3.0.0)
2121
concurrent-ruby (~> 1.0)
2222
htmlentities (4.3.4)
23-
i18n (1.0.1)
23+
i18n (1.1.0)
2424
concurrent-ruby (~> 1.0)
25-
json-ld (2.2.1)
25+
json-ld (3.0.0)
2626
multi_json (~> 1.12)
2727
rdf (>= 2.2.8, < 4.0)
28-
json-ld-preloaded (2.2.3)
28+
json-ld-preloaded (3.0.0)
2929
json-ld (>= 2.2, < 4.0)
3030
multi_json (~> 1.12)
31-
rdf (>= 2.2, < 4.0)
31+
rdf (~> 3.0)
3232
ld-patch (0.3.3)
3333
ebnf (~> 1.1)
3434
rdf (>= 2.2, < 4.0)
@@ -65,11 +65,11 @@ GEM
6565
multi_json (1.13.1)
6666
net-http-persistent (3.0.0)
6767
connection_pool (~> 2.2)
68-
nokogiri (1.8.2)
68+
nokogiri (1.8.4)
6969
mini_portile2 (~> 2.3.0)
7070
nokogumbo (1.5.0)
7171
nokogiri
72-
public_suffix (3.0.2)
72+
public_suffix (3.0.3)
7373
rake (12.3.1)
7474
rdf (3.0.2)
7575
hamster (~> 3.0)
@@ -120,7 +120,7 @@ GEM
120120
rdf-turtle (3.0.1)
121121
ebnf (~> 1.1)
122122
rdf (~> 3.0)
123-
rdf-vocab (3.0.2)
123+
rdf-vocab (3.0.3)
124124
rdf (~> 3.0)
125125
rdf-xsd (3.0.0)
126126
rdf (~> 3.0)

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ end
77

88
desc "Extract Examples"
99
task :examples do
10-
sh %(bundle exec common/extract-examples.rb --example-dir examples index.html)
10+
sh %(rm -rf examples yaml trig)
11+
sh %(bundle exec common/extract-examples.rb --example-dir examples --yaml-dir yaml --trig-dir trig index.html)
1112
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library",
4+
"contains": {
5+
"@type": "Book",
6+
"contains": {
7+
"@type": "Chapter"
8+
}
9+
}
10+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example.org/",
4+
"contains": {"@type": "@id"}
5+
},
6+
"@graph": [{
7+
"@id": "http://example.org/library",
8+
"@type": "Library",
9+
"contains": "http://example.org/library/the-republic"
10+
}, {
11+
"@id": "http://example.org/library/the-republic",
12+
"@type": "Book",
13+
"creator": "Plato",
14+
"title": "The Republic",
15+
"contains": "http://example.org/library/the-republic#introduction"
16+
}, {
17+
"@id": "http://example.org/library/the-republic#introduction",
18+
"@type": "Chapter",
19+
"description": "An introductory chapter on The Republic.",
20+
"title": "The Introduction"
21+
}]
22+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@graph": [{
4+
"@id": "http://example.org/library",
5+
"@type": "Library",
6+
"contains": {
7+
"@id": "http://example.org/library/the-republic",
8+
"@type": "Book",
9+
"contains": {
10+
"@id": "http://example.org/library/the-republic#introduction",
11+
"@type": "Chapter",
12+
"description": "An introductory chapter on The Republic.",
13+
"title": "The Introduction"
14+
},
15+
"creator": "Plato",
16+
"title": "The Republic"
17+
}
18+
}]
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@id": "http://example.org/library",
4+
"@type": "Library",
5+
"contains": {
6+
"@id": "http://example.org/library/the-republic",
7+
"@type": "Book",
8+
"contains": {
9+
"@id": "http://example.org/library/the-republic#introduction",
10+
"@type": "Chapter",
11+
"description": "An introductory chapter on The Republic.",
12+
"title": "The Introduction"
13+
},
14+
"creator": "Plato",
15+
"title": "The Republic"
16+
}
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library",
4+
"description": "A great Library.",
5+
"contains": {
6+
"@type": "Book",
7+
"description": {"@default": "A great book."},
8+
"contains": {
9+
"@type": "Chapter"
10+
}
11+
}
12+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@graph": [{
4+
"@id": "http://example.org/library",
5+
"@type": "Library",
6+
"contains": {
7+
"@id": "http://example.org/library/the-republic",
8+
"@type": "Book",
9+
"contains": {
10+
"@id": "http://example.org/library/the-republic#introduction",
11+
"@type": "Chapter",
12+
"description": "An introductory chapter on The Republic.",
13+
"title": "The Introduction"
14+
},
15+
"creator": "Plato",
16+
"description": "A great book.",
17+
"title": "The Republic"
18+
},
19+
"description": null
20+
}]
21+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library"
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library",
4+
"contains": {
5+
"@type": "Book",
6+
"@embed": "@never"
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@graph": [{
4+
"@id": "http://example.org/library",
5+
"@type": "Library",
6+
"contains": {
7+
"@id": "http://example.org/library/the-republic"
8+
}
9+
}]
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library",
4+
"description": {},
5+
"contains": {
6+
"@type": "Book",
7+
"@explicit": true,
8+
"title": {},
9+
"contains": {
10+
"@type": "Chapter"
11+
}
12+
}
13+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@graph": [{
4+
"@id": "http://example.org/library",
5+
"@type": "Library",
6+
"contains": {
7+
"@id": "http://example.org/library/the-republic",
8+
"@type": "Book",
9+
"contains": {
10+
"@id": "http://example.org/library/the-republic#introduction",
11+
"@type": "Chapter",
12+
"description": "An introductory chapter on The Republic.",
13+
"title": "The Introduction"
14+
},
15+
"title": "The Republic"
16+
},
17+
"description": null
18+
}]
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example.org/",
4+
"within": {"@reverse": "contains"}
5+
},
6+
"@type": "Chapter",
7+
"within": {
8+
"@type": "Book",
9+
"within": {
10+
"@type": "Library"
11+
}
12+
}
13+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example.org/",
4+
"within": {"@reverse": "contains"}
5+
},
6+
"@graph": [{
7+
"@id": "http://example.org/library/the-republic#introduction",
8+
"@type": "Chapter",
9+
"description": "An introductory chapter on The Republic.",
10+
"title": "The Introduction",
11+
"within": {
12+
"@id": "http://example.org/library/the-republic",
13+
"@type": "Book",
14+
"contains": {"@id": "http://example.org/library/the-republic#introduction"},
15+
"creator": "Plato",
16+
"title": "The Republic",
17+
"within": {
18+
"@id": "http://example.org/library",
19+
"@type": "Library",
20+
"contains": {"@id": "http://example.org/library/the-republic"}
21+
}
22+
}
23+
}]
24+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@type": "Library",
4+
"contains": {
5+
"@id": "http://example.org/graphs/books",
6+
"@graph": {
7+
"@type": "Book"
8+
}
9+
}
10+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@id": "http://example.org/graphs/books",
4+
"@graph": [{
5+
"@id": "http://example.org/library/the-republic",
6+
"@type": "http://example.org/Book",
7+
"http://example.org/contains": {
8+
"@id": "http://example.org/library/the-republic#introduction"
9+
},
10+
"http://example.org/creator": "Plato",
11+
"http://example.org/title": "The Republic"
12+
}, {
13+
"@id": "http://example.org/library/the-republic#introduction",
14+
"@type": "http://example.org/Chapter",
15+
"http://example.org/description": "An introductory chapter on The Republic.",
16+
"http://example.org/title": "The Introduction"
17+
}]
18+
}, {
19+
"@context": {"@vocab": "http://example.org/"},
20+
"@id": "http://example.org/library",
21+
"@type": "http://example.org/Library",
22+
"http://example.org/contains": {"@id": "http://example.org/graphs/books"},
23+
"http://example.org/name": "Library"
24+
}]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@graph": [{
4+
"@id": "http://example.org/library",
5+
"@type": "Library",
6+
"name": "Library",
7+
"contains": {
8+
"@id": "http://example.org/graphs/books",
9+
"@graph": {
10+
"@id": "http://example.org/library/the-republic",
11+
"@type": "Book",
12+
"creator": "Plato",
13+
"title": "The Republic",
14+
"contains": {
15+
"@id": "http://example.org/library/the-republic#introduction",
16+
"@type": "Chapter",
17+
"description": "An introductory chapter on The Republic.",
18+
"title": "The Introduction"
19+
}
20+
}
21+
}
22+
}]
23+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@prefix ex: <http://example.org/> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4+
5+
ex:library a ex:Library;
6+
ex:contains <http://example.org/library/the-republic> .
7+
8+
<http://example.org/library/the-republic> a ex:Book;
9+
ex:contains <http://example.org/library/the-republic#introduction>;
10+
ex:creator "Plato";
11+
ex:title "The Republic" .
12+
13+
<http://example.org/library/the-republic#introduction> a ex:Chapter;
14+
ex:description "An introductory chapter on The Republic.";
15+
ex:title "The Introduction" .
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@prefix ex: <http://example.org/> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4+
5+
ex:library a ex:Library;
6+
ex:contains <http://example.org/library/the-republic> .
7+
8+
<http://example.org/library/the-republic> a ex:Book;
9+
ex:contains <http://example.org/library/the-republic#introduction>;
10+
ex:creator "Plato";
11+
ex:title "The Republic" .
12+
13+
<http://example.org/library/the-republic#introduction> a ex:Chapter;
14+
ex:description "An introductory chapter on The Republic.";
15+
ex:title "The Introduction" .
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@prefix ex: <http://example.org/> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4+
5+
ex:library a ex:Library;
6+
ex:contains <http://example.org/library/the-republic> .
7+
8+
<http://example.org/library/the-republic> a ex:Book;
9+
ex:contains <http://example.org/library/the-republic#introduction>;
10+
ex:creator "Plato";
11+
ex:title "The Republic" .
12+
13+
<http://example.org/library/the-republic#introduction> a ex:Chapter;
14+
ex:description "An introductory chapter on The Republic.";
15+
ex:title "The Introduction" .
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@prefix ex: <http://example.org/> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4+
5+
ex:library a ex:Library;
6+
ex:contains <http://example.org/library/the-republic> .
7+
8+
<http://example.org/library/the-republic> a ex:Book;
9+
ex:contains <http://example.org/library/the-republic#introduction>;
10+
ex:creator "Plato";
11+
ex:title "The Republic" .
12+
13+
<http://example.org/library/the-republic#introduction> a ex:Chapter;
14+
ex:description "An introductory chapter on The Republic.";
15+
ex:title "The Introduction" .

0 commit comments

Comments
 (0)