-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (47 loc) · 8.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Linked Data Fragments</title>
<link rel="stylesheet" href="styles/ldf.css" />
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
</head>
<body>
<header>
<h1>Triple Pattern Fragments<br><em>Interactive Tutorial</em></h1>
<figure class="logo">
<a href="http://linkeddatafragments.org/"><img src="images/ldf.svg" alt="Linked Data Fragments" /></a>
</figure>
</header>
<main>
<h2>Triple Pattern Fragments in the browser</h2>
<p>Browse some Triple Pattern Fragments:</p>
<ul>
<li><a href="http://fragments.dbpedia.org/2015/en">http://fragments.dbpedia.org/2015/en</a></li>
<li><a href="http://fragments.dbpedia.org/2015/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania">http://fragments.dbpedia.org/2015/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania</a></li>
<li><a href="http://fragments.dbpedia.org/2015/en?object=http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania">http://fragments.dbpedia.org/2015/en?object=http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania</a></li>
</ul>
<p>Make your browser execute a SPARQL query with Triple Pattern Fragments:</p>
<ul>
<li><a href="http://client.linkeddatafragments.org/">http://client.linkeddatafragments.org/</a></li>
</ul>
<h2>Triple Pattern Fragments for machine clients</h2>
<p>Fetch Triple Pattern Fragments with curl.</p>
<p><a href="examples.sh">Examples</a>.</p>
<h2>Programming Triple Pattern Fragments</h2>
<ul>
<li><a href="console.html#%2F%2F%20Output%20things%20with%20the%20show%20function%0Ashow(%22It's%20just%20JavaScript%22)%3B%0Afor%20(var%20i%20%3D%201%3B%20i%20%3C%3D%203%3B%20i%2B%2B)%0A%20%20show('Counting'%2C%20i)%3B%0A%0A%2F%2F%20Object%20can%20be%20fully%20printed%20as%20well%0Ashow(%7B%20json%3A%20true%2C%20xml%3A%20false%20%7D)%3B%0A%0A%2F%2F%20Trigger%20functions%20with%20buttons%0AbuttonA(function%20()%20%7B%0A%20%20show('Clicked%20button%20A')%3B%0A%7D)%3B">Getting started with the console</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20client%20that%20fetches%20fragments%20over%20HTTP%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient('http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen')%3B%0A%0A%2F%2F%20Fetch%20the%20fragment%20with%20the%20specified%20pattern%0Avar%20pattern%20%3D%20%7B%20subject%3A%20'http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania'%20%7D%3B%0Avar%20fragment%20%3D%20fragments.getFragmentByPattern(pattern)%3B%0A%0A%2F%2F%20Print%20all%20data%20of%20the%20fragment%0Afragment.on('data'%2C%20show)%3B">Fetching data from a fragment (streaming)</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20client%20that%20fetches%20fragments%20over%20HTTP%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient('http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen')%3B%0A%0A%2F%2F%20Fetch%20the%20fragment%20with%20the%20specified%20pattern%0Avar%20pattern%20%3D%20%7B%20subject%3A%20'http%3A%2F%2Fdbpedia.org%2Fresource%2FPennsylvania'%20%7D%3B%0Avar%20fragment%20%3D%20fragments.getFragmentByPattern(pattern)%3B%0A%0A%2F%2F%20Print%20one%20element%20of%20the%20data%0AbuttonA(function%20()%20%7B%0A%20%20show(fragment.read())%3B%0A%7D)%3B">Fetching data from a fragment (on-demand)</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20client%20that%20fetches%20fragments%20over%20HTTP%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient('http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen')%3B%0A%0A%2F%2F%20Create%20a%20SPARQL%20query%20iterator%0Avar%20query%20%3D%20'SELECT%20%3Fp%20%3Fc%20WHERE%20%7B%5C%0A%20%20%20%20%3Fp%20a%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FArtist%3E.%5C%0A%20%20%20%20%3Fp%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FbirthPlace%3E%20%3Fc.%5C%0A%20%20%20%20%3Fc%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%3E%20%22York%22%40en.%5C%0A%7D'%3B%0Avar%20results%20%3D%20new%20ldf.SparqlIterator(query%2C%20%7B%20fragmentsClient%3A%20fragments%20%7D)%3B%0Aresults.on('data'%2C%20show)%3B">Executing a SPARQL query (streaming)</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20client%20that%20fetches%20fragments%20over%20HTTP%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient('http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen')%3B%0A%0A%2F%2F%20Create%20a%20SPARQL%20query%20iterator%0Avar%20query%20%3D%20'SELECT%20%3Fp%20%3Fc%20WHERE%20%7B%5C%0A%20%20%20%20%3Fp%20a%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FArtist%3E.%5C%0A%20%20%20%20%3Fp%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FbirthPlace%3E%20%3Fc.%5C%0A%20%20%20%20%3Fc%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%3E%20%22York%22%40en.%5C%0A%7D'%3B%0Avar%20results%20%3D%20new%20ldf.SparqlIterator(query%2C%20%7B%20fragmentsClient%3A%20fragments%20%7D)%3B%0AbuttonA(function%20()%20%7B%20show(results.read())%3B%20%7D)%3B">Executing a SPARQL query (on-demand)</a></li>
<li><a href="console.html#var%20fragments%20%3D%20new%20ldf.FragmentsClient('http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen')%3B%0Avar%20query%20%3D%20'SELECT%20*%20WHERE%20%7B%5C%0A%20%20%20%20%3Fartist%20a%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FArtist%3E.%5C%0A%20%20%20%20%3Fartist%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%3E%20%3Flabel.%5C%0A%20%20%20%20%3Fartist%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fdepiction%3E%20%3Fimage.%5C%0A%20%20%20%20FILTER%20LANGMATCHES(LANG(%3Flabel)%2C%20%22EN%22)%5C%0A%7D%20LIMIT%2030'%3B%0Avar%20results%20%3D%20new%20ldf.SparqlIterator(query%2C%20%7B%20fragmentsClient%3A%20fragments%20%7D)%3B%0A%0A%2F%2F%20Show%20an%20image%20for%20each%20data%20item%0Aresults.on('data'%2C%20function%20(mapping)%20%7B%0A%20%20%24('%23output').append(%24('%3Cimg%3E'%2C%20%7B%C2%A0src%3A%20mapping%5B'%3Fimage'%5D%2C%20width%3A%20100%20%7D)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%20'%2C%20N3.Util.getLiteralValue(mapping%5B'%3Flabel'%5D)%2C%20'%5Cn')%3B%0A%7D)%3B">Generating images from a SPARQL query</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20federated%20client%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient(%5B%0A%20%20'http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen'%2C%0A%20%20'http%3A%2F%2Fdata.linkeddatafragments.org%2Fviaf'%2C%0A%5D)%3B%0A%0Avar%20query%20%3D%20'SELECT%20%3Fname%20%3Fwork%20%3Ftitle%20%7B%5C%0A%20%20%3Fartist%20dbpedia-owl%3Amovement%20%5B%20rdfs%3Alabel%20%22Cubism%22%40en%20%5D%3B%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20foaf%3Aname%20%3Fname.%5C%0A%20%20%3Fwork%20schema%3Aauthor%20%5B%20schema%3AsameAs%20%3Fartist%20%5D%3B%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20schema%3Aname%20%3Ftitle.%5C%0A%20%20FILTER%20(!REGEX(%3Fname%2C%20%22%2C%22))%5C%0A%7D'%3B%0Avar%20results%20%3D%20new%20ldf.SparqlIterator(query%2C%20%7B%20fragmentsClient%3A%20fragments%2C%20prefixes%3A%20prefixes%20%7D)%3B%0Aresults.on('data'%2C%20show)%3B%0A">Federated query (DBpedia & VIAF)</a></li>
<li><a href="console.html#%2F%2F%20Create%20a%20federated%20client%0Avar%20fragments%20%3D%20new%20ldf.FragmentsClient(%5B%0A%20%20'http%3A%2F%2Ffragments.dbpedia.org%2F2015%2Fen'%2C%0A%20%20'http%3A%2F%2Fdata.linkeddatafragments.org%2Fviaf'%2C%0A%20%20'http%3A%2F%2Fdata.linkeddatafragments.org%2Fharvard'%2C%0A%5D)%3B%0A%0Avar%20query%20%3D%20'SELECT%20%3Fperson%20%3Ftitle%20%7B%5C%0A%20%20%20%20%3Fperson%20dc%3Asubject%20dbpedia%3ACategory%3ASwedish_Nobel_laureates.%5C%0A%20%20%20%20%3FviafID%20schema%3AsameAs%20%3Fperson%3B%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20schema%3Aname%20%3Fname.%5C%0A%20%20%20%20%3Fbook%20dc%3Acontributor%20%5B%20foaf%3Aname%20%3Fname%20%5D%3B%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20dc%3Atitle%20%3Ftitle.%5C%0A%7D'%3B%0Avar%20results%20%3D%20new%20ldf.SparqlIterator(query%2C%20%7B%20fragmentsClient%3A%20fragments%2C%20prefixes%3A%20prefixes%20%7D)%3B%0AbuttonA(function%20()%20%7B%0A%20%20var%20i%20%3D%203%2C%20result%3B%0A%20%20while%20(i--%20%3E%200%20%26%26%20(result%20%3D%20results.read()))%0A%20%20%20%20show(result)%3B%0A%7D)%3B%0A">Federated query (DBpedia, VIAF, Harvard Library)</a></li>
</ul>
</main>
<footer>
<p>©2015 Multimedia Lab – iMinds – Ghent University</p>
</footer>
</body>
</html>