source: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/README-SPARQL-ENDPOINTS.txt@ 35854

Last change on this file since 35854 was 35854, checked in by davidb, 2 years ago

Useful details around the SPARQL querying part of this project

File size: 2.4 KB
Line 
1
2
3# DBpedia SPARQL Endpoint(s)
4
5When the initial work was being done of this project, the following URL
6was used as the DBpedia endpoint:
7
8 https://dbpedia.demo.openlinksw.com/sparql/
9
10Pitched as 'for developers', this was sourced off a newer Wikipedia dump than the
11more public facing:
12
13 https://dbpedia.org/sparql
14
15which from memory was around 4 years old.
16
17Based on details on these web pages, the plan was to update the public facing
18endpoint after sufficient testing. This looks to have now happened.
19
20
21List all the years of the contest:
22
23 PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
24
25 SELECT ?countries_in_esc_by_year
26 WHERE {
27
28 ?countries_in_esc_by_year <http://www.w3.org/2004/02/skos/core#broader> <http://dbpedia.org/resource/Category:Countries_in_the_Eurovision_Song_Contest_by_year>.
29 } LIMIT 2000
30
31List all of the countries (DBpedia knows about!) for each year of the contest
32:
33
34 PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
35 PREFIX dct: <http://purl.org/dc/terms/>
36
37 SELECT ?countries_in_esc_by_year
38 WHERE {
39
40 ?countries_in_esc_by_year <http://www.w3.org/2004/02/skos/core#broader> <http://dbpedia.org/resource/Category:Countries_in_the_Eurovision_Song_Contest_by_year>.
41 ?country_in_year dct:subject ?countries_in_esc_by_year
42
43 } LIMIT 2000
44
45
46 PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
47 PREFIX dbc: <http://dbpedia.org/resource/Category:>
48 PREFIX dct: <http://purl.org/dc/terms/>
49
50 SELECT ?country_in_year
51 WHERE {
52
53 ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
54 ?country_in_year dct:subject ?countries_in_esc_by_year
55
56 } LIMIT 2000
57
58
59
60# Local SPARQL Endpoint(s)
61
62Greenstone3 SPARQL extension (Apache Jena v1) server runs on port 3030
63Greenstone3 SPARQL extension (Apache Jena v3) server runs on port 4040
64
65For development purposes the respective underlying Apache Jena query
66interaces can be access by setting up an ssh tunnel. For example:
67
68 ssh -L 4040:localhost:4040 <remote-greenstone3-host>
69
70
71A query to return just the Errata entries (which centre on the
72dct:source predicate) is:
73
74 PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
75 PREFIX dct: <http://purl.org/dc/terms/>
76
77 SELECT ?graph ?subject ?object WHERE {
78 GRAPH ?graph {
79 ?subject dct:source ?object.
80 }
81 }
82 OFFSET 0 LIMIT 1000
83
Note: See TracBrowser for help on using the repository browser.