query-f4cd1c22b632e5f51577b6830db6ebdc

rq turtle/ttl

TODO

Use at

PREFIX gas: <http://www.bigdata.com/rdf/gas#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Arbre acadèmic
#defaultView:Graph
# gas:maxIterations 4 ;
# gas:maxIterations 6 ;                
# OPTIONAL { ?item wdt:P496 ?ORCID. }
SELECT ?item ?itemLabel ?pic ?linkTo ?rgb WHERE {
  SERVICE gas:service {
    gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS";
      gas:in wd:Q3305393;
      gas:traversalDirection "Forward";
      gas:out ?item;
      gas:out1 ?depth;
      gas:linkType wdt:P185.
  }
  OPTIONAL { ?item wdt:P185 ?linkTo. } 
#  OPTIONAL { ?item wdt:P18 ?pic. }
  BIND(?depth AS ?distancia)
  BIND( IF(?depth = "1", "3182BD", "E6550D") AS ?rgb)
  OPTIONAL {VALUES ?item { wd:Q3305393 }
           ?item wdt:P18 ?pic.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?depth") v4("?distancia") v6("?item"):::projected v3("?linkTo"):::projected v6("?pic"):::projected v5("?rgb"):::projected c2(["gas:program"]):::iri c17(["en"]):::literal c6(["wd:Q3305393"]):::iri c12(["wdt:P185"]):::iri c4(["com.bigdata.rdf.graph.analytics.BFS"]):::literal c15(["bd:serviceParam"]):::iri c8(["Forward"]):::literal subgraph s1["http://www.bigdata.com/rdf/gas#service"] style s1 stroke-width:4px; c2 --"gas:gasClass"--> c4 c2 --"gas:in"--> c6 c2 --"gas:traversalDirection"--> c8 c2 --"gas:out"--> v6 c2 --"gas:out1"--> v2 c2 --"gas:linkType"--> c12 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -->c12--> v3 end bind0[/"?depth"/] v2 --o bind0 bind0 --as--o v4 bind1[/"if(?depth = '1','3182BD','E6550D')"/] v2 --o bind1 bind1 --as--o v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; bind2[/VALUES ?item/] bind2-->v6 bind20(["wd:Q3305393"]) bind20 --> bind2 v6 -."wdt:P18".-> v6 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c15 --"wikibase:language"--> c17 end