query-45bbdb7816cfda85f639b50341d6c63b

rq turtle/ttl

TODO

Use at

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#>
#defaultView:Graph
PREFIX gas: <http://www.bigdata.com/rdf/gas#>

SELECT ?item ?itemLabel ?linkTo
WHERE {
  {
    SERVICE gas:service {
      gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" ;
                  gas:in wd:Q111424233 ;
                  gas:traversalDirection "Forward" ;
                  gas:out ?item ;
                  gas:out1 ?depth ;
                  gas:maxIterations 6 ;
                  gas:linkType wdt:P40
    }
    OPTIONAL { ?item wdt:P40 ?linkTo }
  } UNION {
    SERVICE gas:service {
      gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" ;
                  gas:in wd:Q111424233 ;
                  gas:traversalDirection "Forward" ;
                  gas:out ?item ;
                  gas:out1 ?depth ;                  
                  gas:maxIterations 6 ;
                  gas:linkType wdt:P26.
    }
    OPTIONAL { ?item wdt:P26 ?linkTo }
     }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?depth") v1("?item"):::projected v3("?linkTo"):::projected c2(["gas:program"]):::iri c4(["com.bigdata.rdf.graph.analytics.SSSP"]):::literal c14(["wdt:P40"]):::iri c17(["bd:serviceParam"]):::iri c12(["6^^xsd:integer"]):::literal c15(["wdt:P26"]):::iri c8(["Forward"]):::literal c19(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q111424233"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; 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"--> v1 c2 --"gas:out1"--> v2 c2 --"gas:maxIterations"--> c12 c2 --"gas:linkType"--> c15 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -->c15--> v3 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; 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"--> v1 c2 --"gas:out1"--> v2 c2 --"gas:maxIterations"--> c12 c2 --"gas:linkType"--> c14 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -->c14--> v3 end end union0r <== or ==> union0l end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c17 -."wikibase:language".-> c19 end