Difference between revisions of "Device"
Jump to navigation
Jump to search
Karima Rafes (talk | contribs) |
Karima Rafes (talk | contribs) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#sparql: | {{#sparql: | ||
− | prefix | + | prefix daapd: <http://daap.dsi.universite-paris-saclay.fr/wiki/Data:Device#> |
− | |||
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
prefix vcard: <http://www.w3.org/2006/vcard/ns#> | prefix vcard: <http://www.w3.org/2006/vcard/ns#> | ||
select distinct (?device as ?labelLink) ?label ?picture | select distinct (?device as ?labelLink) ?label ?picture | ||
− | (GROUP_CONCAT(IF(BOUND(?itemLabel) , CONCAT('{{Device/keyword|link=https://www.wikidata.org/wiki/Special:GoToLinkedPage/enwiki/Q',strafter(xsd:string(?item),"/Q"),'|label=',?itemLabel,'}}'),""); separator=" ") as ?keywords) | + | (GROUP_CONCAT(DISTINCT IF(BOUND(?itemLabel) , CONCAT('{{Device/keyword|link=https://www.wikidata.org/wiki/Special:GoToLinkedPage/enwiki/Q',strafter(xsd:string(?item),"/Q"),'|label=',?itemLabel,'}}'),""); separator=", ") as ?keywords) |
− | (GROUP_CONCAT( | + | (GROUP_CONCAT(DISTINCT ?contactPrint; separator="<br/>") as ?contacts) |
where { | where { | ||
?device | ?device | ||
− | rdf:type | + | rdf:type daapd:Device ; |
rdfs:label ?label . | rdfs:label ?label . | ||
− | ?device | + | OPTIONAL{ |
+ | ?device daapd:pilotProcess ?pilot . | ||
?pilot vcard:email ?contactLinkEmail ; | ?pilot vcard:email ?contactLinkEmail ; | ||
vcard:fn ?contact . | vcard:fn ?contact . | ||
+ | |||
+ | BIND( CONCAT('{{Device/contact|contact=',?contact,'|contactLink=',?pilot,'|contactLinkEmail=',?contactLinkEmail,'}}') as ?contactPrint) | ||
+ | } | ||
FILTER langMatches( lang(?label), "EN" ) | FILTER langMatches( lang(?label), "EN" ) | ||
OPTIONAL{ | OPTIONAL{ | ||
− | ?device | + | ?device daapd:picture ?picture . |
} | } | ||
OPTIONAL{ | OPTIONAL{ | ||
− | ?device | + | ?device daapd:item ?item . |
?item rdfs:label ?itemLabel . | ?item rdfs:label ?itemLabel . | ||
FILTER langMatches( lang(?itemLabel), "EN" ) | FILTER langMatches( lang(?itemLabel), "EN" ) |