Template:HubMap

From Wikibase Personal data
Revision as of 09:08, 7 November 2019 by Podehaye (talk | contribs) (Created page with "#defaultView:Graph PREFIX pdio: <http://wiki.personaldata.io/entity/> PREFIX pdiot: <http://wiki.personaldata.io/prop/direct/> SELECT ?node ?nodeLabel ?nodeImage ?childNode ?...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. defaultView:Graph

PREFIX pdio: <http://wiki.personaldata.io/entity/> PREFIX pdiot: <http://wiki.personaldata.io/prop/direct/>

SELECT ?node ?nodeLabel ?nodeImage ?childNode ?childNodeLabel ?childNodeImage ?rgb WHERE {

 {
   BIND(pdio:{{{HubID}}} AS ?node)
   ?node ?p ?i.
   OPTIONAL { ?node pdiot:P47 ?nodeImage. }
   ?childNode ?x ?p.
   ?childNode rdf:type wikibase:Property.
   FILTER(STRSTARTS(STR(?i), "http://wiki.personaldata.io/entity/Q"))
   FILTER(STRSTARTS(STR(?childNode), "http://wiki.personaldata.io/entity/P"))
 }
 UNION
 {
   BIND("EFFBD8" AS ?rgb)
   pdio:{{{HubID}}} ?p ?childNode.
   OPTIONAL { ?childNode pdiot:P47 ?childNodeImage. }
   ?node ?x ?p.
   ?node rdf:type wikibase:Property.
   FILTER(STRSTARTS(STR(?childNode), "http://wiki.personaldata.io/entity/Q"))
 }
 OPTIONAL {
   ?node pdiot:P47 ?nodeImage.
   ?childNode pdiot:P47 ?childNodeImage.
 }
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

}