Difference between revisions of "Device"

From DAAP
Jump to navigation Jump to search
m (Text replacement - "daap.eu" to "daap.dsi.universite-paris-saclay.fr")
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#sparql:
 
{{#sparql:
prefix daap: <http://daap.eu/wiki/>  
+
 
prefix daapProp: <http://daap.eu/wiki/Property:>  
+
prefix daap: <http://daap.dsi.universite-paris-saclay.fr/wiki/>  
 +
prefix daapProp: <http://daap.dsi.universite-paris-saclay.fr/wiki/Property:>  
 
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 ?link (GROUP_CONCAT(?test; separator=", ") as ?Keywords)   
+
select distinct (?device as ?labelLink) ?label ?picture
?picture  (GROUP_CONCAT(?contact; separator="<br/>") as ?contacts)   
+
(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)   
?linkLabel
+
(GROUP_CONCAT(DISTINCT CONCAT('{{Device/contact|contact=',?contact,'|contactLink=',?pilot,'|contactLinkEmail=',?contactLinkEmail,'}}'); separator="<br/>") as ?contacts)   
 
where {
 
where {
?link
+
  ?device
  rdf:type daap:Device ;
+
      rdf:type daap:Device ;
  daapProp:piloteProcess ?pilot ;
+
      rdfs:label ?label .
rdfs:label ?linkLabel .
 
 
 
?pilot vcard:email ?contactEmail .
 
?pilot vcard:fn ?contactfn .
 
 
 
  BIND(CONCAT( "[",?contactEmail," ",?contactfn,"]") AS ?contact)
 
 
 
        FILTER langMatches( lang(?linkLabel), "EN" )
 
OPTIONAL{
 
?link  daapProp:picture ?picture .
 
}
 
 
 
OPTIONAL{
 
?link daapProp:item ?item .
 
?item rdfs:label ?itemLabel .
 
 
 
        FILTER langMatches( lang(?itemLabel), "EN" )
 
  
   BIND(CONCAT( "[",?item," ",?itemLabel,"]") AS ?test)
+
      ?device daapProp:pilotProcess ?pilot .
}
+
      ?pilot vcard:email ?contactLinkEmail ;
      }  
+
              vcard:fn ?contact .
 +
   FILTER langMatches( lang(?label), "EN" )
 +
  OPTIONAL{
 +
          ?device  daapProp:picture ?picture .
 +
  }
 +
  OPTIONAL{
 +
          ?device daapProp:item ?item .
 +
          ?item rdfs:label ?itemLabel .
 +
          FILTER langMatches( lang(?itemLabel), "EN" )  
 +
  }
 +
}  
 +
GROUP BY ?device ?label ?picture
 +
ORDER BY ?label
  
GROUP BY ?link ?linkLabel ?picture
 
ORDER BY ?linkLabel
 
 
|endpoint=http://opendata1.opendata.u-psud.fr/sparql
 
|endpoint=http://opendata1.opendata.u-psud.fr/sparql
| headers = Device , Keywords ,Picture,Contact
+
|headers = Device , Keywords ,Picture,Contact
|templates=link,,,
+
|templates=Device/label,Device/keywords,Device/picture,Device/contacts
 
}}
 
}}

Revision as of 14:26, 26 April 2021

Device Keywords Picture Contact
14:32:40 11/28/2021 -- Refresh -- Duration of query :0.116s