Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-PUT-GRAPH-TTL.sh
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-PUT-GRAPH-TTL.sh	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-PUT-GRAPH-TTL.sh	(revision 34813)
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+graph=${1:-eurovision-errata}
+input_ttl_file=${2:-eurovision-errata.ttl}
+
+#s-put http://localhost:3030/greenstone/data default "$input_ttl_file"
+
+# 'default' doesn't seem to have the wanted effect
+#   => specifying 'eurovision' as collecion name
+#   => from earlier development work, Jena config settings showed this to
+#      also automatically add stored tripples in the default graph
+
+echo ""
+
+echo "Ingesting locally into graph:"
+echo "  $graph"
+echo ""
+echo "The Turtle TTL file:"
+echo "  $input_ttl_file"
+
+echo ""
+
+s-put http://localhost:3030/greenstone/data "$graph" "$input_ttl_file"
+
+
+
+# s-query --service http://localhost:3030/greenstone/query 'SELECT * {?s ?p ?o}'
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-QUERY.sh
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-QUERY.sh	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-QUERY.sh	(revision 34813)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+input_sparql_query_file=${1:-fix-problem-songs--using-errata.sparql}
+
+sparql_query=`cat "$input_sparql_query_file"`
+
+echo ""
+echo "Sending:"
+echo "  $input_sparql_query_file"
+echo ""
+echo "To local SPARQL endpoint:"
+echo "   http://localhost:3030/greenstone/query"
+echo ""
+
+s-query --service http://localhost:3030/greenstone/query \
+	"$sparql_query"
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-RESET--ERRATA-ALL.sh
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-RESET--ERRATA-ALL.sh	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/LOCAL-LOD-RESET--ERRATA-ALL.sh	(revision 34813)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+gs-triplestore-reset eurovision-errata
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/eurovision-errata.ttl
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/eurovision-errata.ttl	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/eurovision-errata.ttl	(revision 34813)
@@ -0,0 +1,345 @@
+# Songs and Artists that don't currently resolve to URIs
+
+@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
+
+@prefix dbp:	<http://dbpedia.org/property/> .
+@prefix dbo:	<http://dbpedia.org/ontology/> .
+@prefix dbr:	<http://dbpedia.org/resource/> .
+@prefix dbc:	<http://dbpedia.org/resource/Category:> .
+
+@prefix dct:	<http://purl.org/dc/terms/> .
+
+
+####
+# Song (title) errata
+####
+
+
+dbr:Le_plus_beau_jour_de_ma_vie         dct:source  "& \"Le plus beau jour de ma vie"@en.
+dbr:Ne_crois_pas                        dct:source  "Ne Crois Pas\" and"@en.
+dbr:Les_amants_de_minuit                dct:source  "\"Les Amants De Minuit"@en.
+dbr:So_geht_das_jede_Nacht              dct:source  "& \"So Geht Das Jede Nacht"@en.
+dbr:De_vogels_van_Holland               dct:source  "De vogels van Holland\" and"@en.
+
+dbr:Voorgoed_voorbij                    dct:source  "\"Voorgoed voorbij"@en.
+dbr:Refrain_\(Lys_Assia_song\)          dct:source  "Das alte Karussell\" and \"Refrain"@en.
+dbr:Das_alte_Karussell                  dct:source  "Das alte Karussell\" and \"Refrain"@en.
+dbr:Amami_se_vuoi                       dct:source  "\"Amami se vuoi"@en.
+dbr:Walking_the_Streets_in_the_Rain     dct:source  "I'm Walking the Streets in the Rain"@en.
+dbr:Come_Back_to_Stay                   dct:source  "Come Back to Stay"@en.
+dbr:If_I_Could_Choose                   dct:source  "If I Could Choose"@en.
+dbr:Stress_\(Odd_BÃžrre_song\)           dct:source  "Jeg har aldri vÃŠrt sÃ¥ glad i noen som deg \nStress"@en.
+dbr:Chance_of_a_Lifetime_\(Pat_McGeegan_song\)      dct:source  "Chance of a Lifetime"@en.
+dbr:The_Wages_of_Love                   dct:source  "The Wages of Love"@en.
+dbr:Halo\,_Halo                         dct:source  "Halo, halo"@en.
+
+#!!!!
+# Issue with the following as DBPedia does not currently handled '%' in URL correctly!!
+#!!!!
+dbr:100%25_d%27amour                    dct:source  "100"^^xsd:integer.
+
+dbr:To_Katalava_Arga                    dct:source  "\"To katalava arga\""@en.
+dbr:Tora_Zo                             dct:source  "\"Î€ÏÏÎ± Î¶Ï"@en.
+dbr:Muretut_meelt_ja_sÃŒdametuld         dct:source  "Muretut meelt ja sÃŒdametuld"@en.
+
+#!!
+# no wiki page for song
+dbr:Nu_pleca                            dct:source  "Nu pleca"@en.
+
+#!!
+# no wiki page for song
+dbr:Amnestia_na_neveru                  dct:source  "Amnestia na neveru"@en.
+
+#!!
+# no wiki page for song
+dbr:Planet_of_Blue                      dct:source  "Planet of Blue"@en.
+
+#!!
+# no wiki page for song
+dbr:Fortuna                             dct:source  "Fortuna"@en.
+
+dbr:Emor_Shalom                         dct:source  "Shalom Olam"@en.
+
+#!!!!
+# Issue with the following as DBPedia does not currently handled '%' in URL correctly!!
+#!!!!
+dbr:100%25_te_ljubam                    dct:source  "100"^^xsd:integer.
+
+
+dbr:2_Long_\(Andrzej_Piaseczny_song\)   dct:source  "2"^^xsd:integer.
+dbr:7th_Wonder                          dct:source  "7"^^xsd:integer.
+dbr:1944_\(song\)                       dct:source  "1944"^^xsd:integer.
+dbr:22_\(Sarah_McTernan_song\)          dct:source  "22"^^xsd:integer.
+
+
+
+
+####
+# Entrant (artist) errata
+####
+
+dbr:Freddy_Quinn                        dct:source    "& Freddy Quinn"@en.
+dbr:Jetty_Paerl                         dct:source    "Jetty Paerl and"@en.
+dbr:Gustav_Winckler                     dct:source    "and Gustav Winckler"@en.
+dbr:Liane_Augustin                      dct:source    "Liane Augustin"@en.
+dbr:Butch_Moore                         dct:source    "Butch Moore"@en.
+dbr:Svante_Thuresson                    dct:source    "& Svante Thuresson"@en.
+dbr:Dickie_Rock                         dct:source    "Dickie Rock"@en.
+dbr:Lado_Leskovar                       dct:source    "Lado Leskovar"@en.
+dbr:Sean_Dunphy                         dct:source    "Sean Dunphy"@en.
+dbr:Pat_McGuigan                        dct:source    "Pat McGeegan"@en.
+
+#!!!!! -> 3M or the Ms ...
+# 4M issue !! (Yugoslavia 1969)
+# artist string is "4M" => split into singer + 3M (note page is with 'smart quote' apostrophie
+dbr:Ivica_KrajaÄ                        dct:source    "4M"@en.
+dbr:3_%C2%B4s                           dct:source    "4M"@en.
+
+dbr:Siw_Malmkvist                       dct:source    "Siw Malmkvist"@en.
+dbr:Muriel_Day                          dct:source    "Muriel Day"@en.
+dbr:Kaveret                             dct:source    "Kaveret as 'Poogy'"@en.
+dbr:Lynsey_de_Paul                      dct:source    "Lynsey de Paul and Mike Moran"@en.
+dbr:Michael_Moran_\(music_producer\)    dct:source    "Lynsey de Paul and Mike Moran"@en.
+dbr:Izhar_Cohen                         dct:source    "Izhar Cohen and the Alphabeta"@en.
+dbr:Alphabeta                           dct:source    "Izhar Cohen and the Alphabeta"@en.
+dbr:Aska_\(group\)                      dct:source    "Aska"@en.
+
+#!!
+# no wiki page for artist
+dbr:Neco_\(singer\)                     dct:source    "Neco"@en.
+
+#!!
+# typo in surname (and using anglesized firstname)
+dbr:Kristi_Stassinopoulou               dct:source    "Christie Stasinopoulou"@en.
+
+#!!
+# no wiki page for artist
+dbr:Rainy_Day_\(Swiss_band\)            dct:source    "Rainy Day"@en.
+
+#!!
+# no *english* wiki page for Pino Gasparini
+dbr:Mariella_FarrÃ©                      dct:source    "Mariella FarrÃ© & Pino Gasparini"@en.
+dbr:Pino_Gasparini                      dct:source    "Mariella FarrÃ© & Pino Gasparini"@en.
+
+dbr:Lasse_Holm                          dct:source    "Lasse Holm and Monica TÃ¶rnell"@en.
+dbr:Monica_TÃ¶rnell                      dct:source    "Lasse Holm and Monica TÃ¶rnell"@en.
+
+
+#!!
+# no *english* wiki page for Sarai Tzuriel
+dbr:Moti_Giladi                         dct:source    "Moti Giladi and Sarai Tzuriel"@en.
+dbr:Sarai_Tzuriel                       dct:source    "Moti Giladi and Sarai Tzuriel"@en.
+
+
+#!!
+# no wiki page for artist
+dbr:Bandjo                              dct:source    "Bandjo"@en.
+
+
+#!!
+# no *english* wiki page for Maxi & Chris Garden 
+
+dbr:Maxi_%26_Chris_Garden               dct:source    "Maxi & Chris Garden"@en.
+
+
+#!!
+# no wiki page for The Missing Passengers
+dbr:Kiev_Connolly                       dct:source    "Kiev Connolly & The Missing Passengers"@en.
+dbr:The_Missing_Passengers              dct:source    "Kiev Connolly & The Missing Passengers"@en.
+
+#!!
+# no *english* wiki page
+dbr:Grup_Pan                            dct:source     "Grup Pan"@en.
+
+#!!
+# no wiki page
+dbr:Gili_%26_Galit                      dct:source     "Gili & Galit"@en.
+
+dbr:Simone_Stelzer                      dct:source     "Simone Stelzer"@en.
+dbr:Liam_Reilly                         dct:source     "Liam Reilly"@en.
+
+#!!
+# no wiki page for Wave
+dbr:Christos_Callow                     dct:source     "Christos Callow & Wave"@en.
+dbr:Wave_\(Greek_band\)                  dct:source     "Christos Callow & Wave"@en.
+ 	
+#!!
+# no *english* wiki for Can (auto-resolves to page about entry)
+dbr:Ä°zel_\(singer\)                     dct:source     "Ä°zel-Reyhan-Can"@en.
+dbr:Reyhan_Karaca                       dct:source     "Ä°zel-Reyhan-Can"@en.
+dbr:Can_UÄurluer                        dct:source     "Ä°zel-Reyhan-Can"@en.
+
+dbr:Marion_Welter                       dct:source     "Marion Welter and Kontinent"@en.
+dbr:Kontinent_\(band\)                  dct:source     "Marion Welter and Kontinent"@en.
+
+ 	
+dbr:Merethe_TrÃžan                       dct:source      "Merethe TrÃžan"@en.
+dbr:Kali_\(singer\)                     dct:source      "Kali"@en.
+dbr:Heart_2_Heart_\(band\)              dct:source      "Heart 2 Heart"@en.
+dbr:Dina_\(singer\)                     dct:source      "Dina"@en.
+
+#!!
+# no *english wiki for "Extra Nena" (note also is an alias)
+
+dbr:SneÅŸana_BeriÄ                       dct:source      "Extra Nena"@en.
+
+#!!
+# no wiki page for either artist
+dbr:Kenny_LÃŒbcke                        dct:source      "Lotte Nilsson & Kenny LÃŒbcke"@en.
+dbr:Lotte_Nilsson                       dct:source      "Lotte Nilsson & Kenny LÃŒbcke"@en.
+
+dbr:Humphrey_Campbell                   dct:source      "Humphrey Campbell"@en.
+
+#!!
+# no *english* wiki page
+dbr:Daisy_Auvray                        dct:source      "Daisy Auvray"@en.
+
+dbr:Aylin_VatankoÅ                      dct:source      "Aylin VatankoÅ"@en.
+dbr:IngibjÃ¶rg_StefÃ¡nsdÃ³ttir             dct:source      "Inga"@en.
+
+#!!
+# no *english* wiki page
+dbr:Andrea_SzulÃ¡k                       dct:source      "Andrea SzulÃ¡k"@en.
+
+#!!
+# no *english* wiki page
+dbr:SzulÃ¡k_Andrea                       dct:source      "Andrea SzulÃ¡k"@en.
+
+dbr:1X_Band                             dct:source      "1"^^xsd:integer.
+
+#!!
+# no *english* wiki page
+dbr:Burak_Aydos                         dct:source      "Burak Aydos"@en.
+
+#!!!!
+# ESC entry incorrectly links to the URI "Dejan"
+dbr:Alma_ÄardÅŸiÄ                        dct:source      "Alma ÄardÅŸiÄ & Dejan LazareviÄ"@en.
+dbr:Dejan_LazareviÄ_\(singer\)          dct:source      "Alma ÄardÅŸiÄ & Dejan LazareviÄ"@en.
+
+
+dbr:Charlie_McGettigan                  dct:source      "& Charlie McGettigan"@en.
+
+#!!
+# no *english* wiki page
+dbr:Csaba_Szigeti                       dct:source      "Csaba Szigeti"@en.
+
+dbr:Darja_Å vajger                       dct:source      "Darja Å vajger"@en.
+
+#!!
+# no wiki page
+dbr:Liora                               dct:source      "Liora"@en.
+
+dbr:HÃ©ritage_des_Celtes                 dct:source      "& L'HÃ©ritage des Celtes"@en.
+
+#!!
+# no *english* wiki page for either
+dbr:Dorte_Andersen                      dct:source      "Dorthe Andersen & Martin Loft"@en.
+dbr:Martin_Loft                         dct:source      "Dorthe Andersen & Martin Loft"@en.
+
+dbr:Franklin_Brown                      dct:source      "Maxine & Franklin Brown"@en.
+dbr:Maxine_\(singer\)                   dct:source      "Maxine & Franklin Brown"@en.
+
+#!!
+# no *english* wiki page
+dbr:Galit_Bell                          dct:source      "Galit Bell"@en.
+
+
+dbr:Hara_%26_Andreas_Konstantinou       dct:source      "Hara & Andreas Constantinou"@en.
+
+
+#!!
+# no *english* wiki page
+dbr:CÃ©lia_Lawson                        dct:source      "Celia Lawson"@en.
+
+
+dbr:Mrs._Einstein                       dct:source      "Mrs. Einstein"@en.
+
+#!!
+# no *english* wiki page
+dbr:Mietek_SzczeÅniak                   dct:source      "Mietek SzczeÅniak"@en.
+
+dbr:Evelin_Samuel                       dct:source      "Evelin Samuel and Camille"@en.
+dbr:Camille_Camille                     dct:source      "Evelin Samuel and Camille"@en.
+
+
+#!!
+# no *english* wiki page for Mistik
+
+dbr:Tuba_Ãnal                           dct:source      "Tuba Ãnal & Mistik"@en.
+dbr:Grup_Mistik                         dct:source      "Tuba Ãnal & Mistik"@en.
+
+#!!
+# no *english* wiki page
+dbr:Jane_Bogaert                        dct:source      "Jane Bogaert"@en.
+
+#**
+# No mention of Eurovision on SOS wikipedia entry (want to scrub??)
+dbr:PÄ±nar_Ayhan                         dct:source      "PÄ±nar Ayhan & Grup S.O.S."@en.
+dbr:SOS_\(Turkish_Cypriot_band\)        dct:source      "PÄ±nar Ayhan & Grup S.O.S."@en.
+
+
+#**
+# parse error in literal, also band name change!
+dbr:Soul_Militia                        dct:source      "& 2XL"@en.
+
+#!!
+# no wiki page for MusicStars
+dbr:Piero_Esteriore                     dct:source      "Piero Esteriore & The Music Stars"@en.
+dbr:MusicStars                          dct:source      "Piero Esteriore & The Music Stars"@en.
+
+#!!
+# no wiki page: link to be filled in assumes entry will be conjoint name
+dbr:Ivan_%26_Delfin                     dct:source      "Ivan & Delfin"@en.
+
+
+#**
+# Song entry specifies the two dbr:artist who appear dbr:as "2.0" (errata => 2B)
+# Note also the wierd 'byte' type
+dbr:2B_\(band\)                         dct:source      "2.0"^^<http://dbpedia.org/datatype/byte>.
+
+#!!!!
+# no wiki page: redirects to song 'let me try'
+dbr:LuminiÈa_Anghel                     dct:source      "LuminiÅ£a Anghel and Sistem"@en.
+dbr:Sistem                              dct:source      "LuminiÅ£a Anghel and Sistem"@en.
+
+dbr:Laura_%26_The_Lovers                dct:source      "Laura & The Lovers"@en.
+dbr:Arsenie_TodiraÈ                     dct:source      "Arsenium and Natalia Gordienko feat. Connect-R"@en.
+dbr:Natalia_Gordienko                   dct:source      "Arsenium and Natalia Gordienko feat. Connect-R"@en.
+dbr:Connect-R                           dct:source      "Arsenium and Natalia Gordienko feat. Connect-R"@en.
+dbr:Elitsa_Todorova                     dct:source      "Elitsa Todorova and"@en.
+dbr:Dragonfly_\(band\)                  dct:source      "Dragonfly feat. Dado TopiÄ"@en.
+dbr:Dado_TopiÄ                          dct:source      "Dragonfly feat. Dado TopiÄ"@en.
+dbr:4Fun                                dct:source       "4"^^xsd:integer.
+dbr:Tamara_Todevska                     dct:source      "Tamara, VrÄak and Adrian"@en.
+dbr:VrÄak                               dct:source      "Tamara, VrÄak and Adrian"@en.
+dbr:Adrian_Gaxha                        dct:source      "Tamara, VrÄak and Adrian"@en.
+
+#***
+# wike page exists for DJ_Balthazar, BUT is auto-redirect to Deep_Zone_Project
+dbr:Deep_Zone_Project                   dct:source       "Deep Zone & Balthazar"@en.
+dbr:DJ_Balthazar                        dct:source       "Deep Zone & Balthazar"@en.
+
+dbr:Samir_Javadzadeh                    dct:source       "and Samir Javadzadeh"@en.
+dbr:Nico_\(Romanian_singer\)            dct:source       "Nico and Vlad"@en.
+dbr:Vlad_MiriÈÄ                         dct:source       "Nico and Vlad"@en.
+dbr:Flor-de-Lis                         dct:source       "Flor-de-Lis"@en.
+
+#!!
+# no *english* wiki page (not even as a missing link) but exists in, for example, german
+dbr:Alex_Swings_Oscar_Sings\!           dct:source       "Alex Swings Oscar Sings"@en.
+
+dbr:Aysel_Teymurzadeh                   dct:source        "AySel and Arash"@en.
+dbr:Arash_\(singer\)                    dct:source        "AySel and Arash"@en.
+
+
+#!!!!
+# In *entrant* specifies song URI, but this goes to non-page/stub in DBpedia (despite the page existing in Wikipedia)
+# Issue traced to DBPedia not correctly serving up URI pages with %25 used for percent!!
+# Currently not fixable
+#!!!!
+#dbr:Luxembourg_in_the_Eurovision_Song_Contest_1984 dbp:song    dbr:100%25_d%27amour.
+#dbr:Luxembourg_in_the_Eurovision_Song_Contest_1984 dct:source  "100"^^xsd:integer.
+#dbr:100%25_d%27amour         dct:source  "100"^^xsd:integer.
+
+
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/fix-problem-songs--using-errata.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/fix-problem-songs--using-errata.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/fix-problem-songs--using-errata.sparql	(revision 34813)
@@ -0,0 +1,55 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+SELECT ?country_in_year (?year AS ?Year) (?country AS ?Country) ?entrant ?song
+
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year).
+    FILTER ( xsd:integer(?year) < 2020).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant
+        FILTER (isURI(?entrant)).    
+
+    ?country_in_year dbp:song ?song_errata
+       FILTER (isLITERAL(?song_errata)).
+  }
+
+  ?song dct:source ?song_errata.
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?song dbp:artist|dbp:as ?entrant. 
+  }
+
+##  ?song dct:source ?song_errata.
+
+  OPTIONAL {
+    SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+      ?entrant rdfs:label ?entrant_label
+        FILTER (lang(?entrant_label) = 'en').
+    }
+  }
+}
+ORDER BY DESC(?countries_in_esc_by_year)
+
+
+
+
+
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo1.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo1.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo1.sparql	(revision 34813)
@@ -0,0 +1,58 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+
+SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
+       ?entrant (?entrant_label AS ?Creator) ?song (?song_label AS ?Title) (?was_derived_from AS ?WikipediaURL)
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
+    FILTER ( xsd:integer(?year) < 2020).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant.
+
+    ?entrant rdfs:label ?entrant_label
+      FILTER (lang(?entrant_label) = 'en').
+
+    ?country_in_year dbp:song ?song.
+
+  }
+
+  OPTIONAL {
+    ?song_errata_uri dct:source ?song.
+  }
+
+  BIND (IF(isIRI(?song),?song,?song_errata_uri) AS ?song_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+
+    ?song_robust rdfs:label ?song_label_raw
+      FILTER (lang(?song_label_raw) = 'en').
+
+    # Create more DL friendly song-title metadata from Wikipedia song-label
+    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
+
+    OPTIONAL {
+      ?song_robust prov:wasDerivedFrom ?was_derived_from
+    }
+  }
+}
+ORDER BY ASC(?countries_in_esc_by_year) ?country
+
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2-nooptional.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2-nooptional.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2-nooptional.sparql	(revision 34813)
@@ -0,0 +1,67 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+
+SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
+       ?entrant (?entrant_label AS ?Creator) ?song (?song_label AS ?Title) (?was_derived_from AS ?WikipediaURL)
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
+    FILTER ( xsd:integer(?year) < 1969).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant.
+  }
+  
+#  OPTIONAL {
+    ?entrant_errata_uri dct:source ?entrant.
+#  }
+
+  BIND (IF(isIRI(?entrant),?entrant,?entrant_errata_uri) AS ?entrant_robust)
+  
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+ 
+    ?country_in_year dbp:song ?song.
+
+  }
+
+#  OPTIONAL {
+    ?song_errata_uri dct:source ?song.
+#  }
+
+  BIND (IF(isIRI(?song),?song,?song_errata_uri) AS ?song_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+  
+    ?entrant_robust rdfs:label ?entrant_label
+      FILTER (lang(?entrant_label) = 'en').
+
+
+    ?song_robust rdfs:label ?song_label_raw
+      FILTER (lang(?song_label_raw) = 'en').
+
+    # Create more DL friendly song-title metadata from Wikipedia song-label
+    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
+
+    OPTIONAL {
+      ?song_robust prov:wasDerivedFrom ?was_derived_from
+    }
+  }
+}
+ORDER BY ASC(?countries_in_esc_by_year) ?country
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.json
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.json	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.json	(revision 34813)
@@ -0,0 +1,7 @@
+
+Sending:
+  foo2.sparql
+
+To local SPARQL endpoint:
+   http://localhost:3030/greenstone/query
+
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo2.sparql	(revision 34813)
@@ -0,0 +1,67 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+
+SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
+       ?entrant (?entrant_label AS ?Creator) ?song (?song_label AS ?Title) (?was_derived_from AS ?WikipediaURL)
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
+    FILTER ( xsd:integer(?year) < 1969).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant.
+  }
+  
+  OPTIONAL {
+    ?entrant_errata_uri dct:source ?entrant.
+  }
+
+  BIND (IF(isIRI(?entrant),?entrant,?entrant_errata_uri) AS ?entrant_robust)
+  
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+ 
+    ?country_in_year dbp:song ?song.
+
+  }
+
+  OPTIONAL {
+    ?song_errata_uri dct:source ?song.
+  }
+
+  BIND (IF(isIRI(?song),?song,?song_errata_uri) AS ?song_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+  
+    ?entrant_robust rdfs:label ?entrant_label
+      FILTER (lang(?entrant_label) = 'en').
+
+
+    ?song_robust rdfs:label ?song_label_raw
+      FILTER (lang(?song_label_raw) = 'en').
+
+    # Create more DL friendly song-title metadata from Wikipedia song-label
+    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
+
+    OPTIONAL {
+      ?song_robust prov:wasDerivedFrom ?was_derived_from
+    }
+  }
+}
+ORDER BY DESC(?countries_in_esc_by_year)
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo3.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo3.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo3.sparql	(revision 34813)
@@ -0,0 +1,67 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+
+SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
+       ?entrant_robust (?entrant_label AS ?Creator) ?song_robust (?song_label AS ?Title) (?was_derived_from AS ?WikipediaURL)
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
+    FILTER ( xsd:integer(?year) < 1960).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant.
+  }
+
+  OPTIONAL {
+    ?entrant_errata_uri dct:source ?entrant.
+  }
+
+  BIND (IF(isIRI(?entrant),?entrant,?entrant_errata_uri) AS ?entrant_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+
+    ?country_in_year dbp:song ?song.
+
+  }
+
+  OPTIONAL {
+    ?song_errata_uri dct:source ?song.
+  }
+
+  BIND (IF(isIRI(?song),?song,?song_errata_uri) AS ?song_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+
+    ?entrant_robust rdfs:label ?entrant_label
+      FILTER (lang(?entrant_label) = 'en').
+
+
+    ?song_robust rdfs:label ?song_label_raw
+      FILTER (lang(?song_label_raw) = 'en').
+    # Create more DL friendly song-title metadata from Wikipedia song-label
+    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
+
+    OPTIONAL {
+      ?song_robust prov:wasDerivedFrom ?was_derived_from
+    }
+  }
+}
+ORDER BY ASC(?countries_in_esc_by_year) ?country
+
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo4-1993.sparql
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo4-1993.sparql	(revision 34813)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata/foo4-1993.sparql	(revision 34813)
@@ -0,0 +1,68 @@
+prefix skos:   <http://www.w3.org/2004/02/skos/core#>
+prefix dct:    <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
+
+prefix dbc:    <http://dbpedia.org/resource/Category:>
+prefix dbr:    <http://dbpedia.org/resource/>
+prefix dbp:    <http://dbpedia.org/property/>
+
+PREFIX dbo:    <http://dbpedia.org/ontology/>
+
+PREFIX prov:   <http://www.w3.org/ns/prov#>
+
+
+SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
+       ?entrant_robust (?entrant_label AS ?Creator) ?song_robust (?song_label AS ?Title) (?was_derived_from AS ?WikipediaURL)
+WHERE {
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
+
+    ?country_in_year dct:subject ?countries_in_esc_by_year.
+    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
+    FILTER ( xsd:integer(?year) = 1993).
+
+    ?country_in_year dbp:country ?country.
+
+    ?country_in_year dbp:entrant ?entrant.
+  }
+
+  OPTIONAL {
+    ?entrant_errata_uri dct:source ?entrant.
+  }
+
+  BIND (IF(isIRI(?entrant),?entrant,?entrant_errata_uri) AS ?entrant_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+
+    ?country_in_year dbp:song ?song.
+
+  }
+
+  OPTIONAL {
+    ?song_errata_uri dct:source ?song.
+  }
+
+  BIND (IF(isIRI(?song),?song,?song_errata_uri) AS ?song_robust)
+
+  SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
+
+   OPTIONAL {
+    ?entrant_robust rdfs:label ?entrant_label
+      FILTER (lang(?entrant_label) = 'en').
+
+
+    ?song_robust rdfs:label ?song_label_raw
+      FILTER (lang(?song_label_raw) = 'en').
+    # Create more DL friendly song-title metadata from Wikipedia song-label
+    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
+
+   
+      ?song_robust prov:wasDerivedFrom ?was_derived_from
+    }
+  }
+}
+ORDER BY ASC(?countries_in_esc_by_year) ?country
+
