function findPerformer(icon_node, entity_name) {
var url = 'https://query.wikidata.org/sparql';
- var query = 'SELECT DISTINCT ?item ?itemLabel ?itemDescription ?image ?birthPlace ?birthPlaceLabel ' +
+ var query = 'SELECT DISTINCT ?item ?itemLabel ?itemDescription ?image ?instrumentLabel ?birthPlace ?birthPlaceLabel ' +
'?website ?musicbrainz ?songKick ?twitter ?facebook ' +
'WHERE { ' +
'?item rdfs:label|skos:altLabel|wdt:P1449 "' + entity_name + '"@en . ' +
'{ ?item wdt:P106/wdt:P279* wd:Q639669 . } ' +
'OPTIONAL { ?item wdt:P3478 ?songKick } . ' +
'OPTIONAL { ?item wdt:P19 ?birthPlace } . ' +
+ 'OPTIONAL { ?item wdt:P1303 ?instrument } . ' +
'OPTIONAL { ?item wdt:P856 ?website } . ' +
'OPTIONAL { ?item wdt:P434 ?musicbrainz } . ' +
'OPTIONAL { ?item wdt:P2002 ?twitter } . ' +
}
valueLink.innerText = labelText;
valueDiv.appendChild(valueLink);
+ } else if (label !== null) {
+ var valueText = document.createElement('span');
+ valueText.innerText = labelText;
+ valueDiv.appendChild(valueText);
}
musician.appendChild(valueDiv);
}
}
+ addWDValue('instrumentLabel', 'Instrument: ', 'instrumentLabel', false);
addWDValue('birthPlace', 'Birth place: ', 'birthPlaceLabel', true);
addWDValue('website', 'Web site: ', null, true);
addWDValue('musicbrainz', null, 'Discography (Musicbrainz)', true, function(value) { return 'https://musicbrainz.org/artist/' + value });