query-1fa0d0fc0e29f3793ec2e91111b63019

rq turtle/ttl

Menschen mit "Zika" in der Bezeichnung (label) SELECT ?item ?itemLabel WITH { SELECT * WHERE { BIND ("zika" AS ?searchfor) } } AS %p WITH { SELECT ?item WHERE { INCLUDE %p BIND (CONCAT("haswbstatement:P31=Q5 ", ?searchfor) AS ?searchstr) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org" . bd:serviceParam wikibase:api "Generator" . bd:serviceParam mwapi:generator "search" . bd:serviceParam mwapi:gsrsearch ?searchstr . bd:serviceParam mwapi:gsrlimit "max" . bd:serviceParam mwapi:gsrnamespace "0" . bd:serviceParam mwapi:gsrprop "" . ?item wikibase:apiOutputItem mwapi:title . } } } AS %i WHERE { INCLUDE %i INCLUDE %p ?item rdfs:label ?itemLabel . FILTER (LANG(?itemLabel)="en") FILTER(CONTAINS(LCASE(?itemLabel), ?searchfor)) OPTIONAL { ?item wdt:P698 ?PMID. } OPTIONAL { ?item wdt:P356 ?DOI. } }

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Menschen mit "Zika" in der Bezeichnung (label)
SELECT ?item ?itemLabel 
WHERE {
   {
  SELECT ?item
  WHERE {
     {
  SELECT * WHERE {
    BIND ("zika" AS ?searchfor)
  }
}    BIND (CONCAT("haswbstatement:P31=Q5 ", ?searchfor) AS ?searchstr)
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "www.wikidata.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "search" .
      bd:serviceParam mwapi:gsrsearch ?searchstr .
      bd:serviceParam mwapi:gsrlimit "max" .
      bd:serviceParam mwapi:gsrnamespace "0" .
      bd:serviceParam mwapi:gsrprop "" .
      ?item wikibase:apiOutputItem mwapi:title .
    }
  }
}   {
  SELECT * WHERE {
    BIND ("zika" AS ?searchfor)
  }
}  ?item rdfs:label ?itemLabel .
  FILTER (LANG(?itemLabel)="en")
  FILTER(CONTAINS(LCASE(?itemLabel), ?searchfor))
  OPTIONAL { ?item wdt:P698 ?PMID. }
  OPTIONAL { ?item wdt:P356 ?DOI. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?DOI") v5("?PMID") v4("?item"):::projected v1("?itemLabel"):::projected v5("?searchfor") v3("?searchstr") c5(["www.wikidata.org"]):::literal c16([""]):::literal c12(["max"]):::literal c14(["0"]):::literal c9(["search"]):::literal c3(["bd:serviceParam"]):::iri c18(["mwapi:title"]):::iri c7(["Generator"]):::literal f0[["contains(lower-case(?itemLabel),?searchfor)"]] f0 --> v1 f0 --> v5 f1[["?itemLabel = 'en'"]] f1 --> v1 bind2[/"'zika'"/] bind2 --as--o v5 bind3[/"concat('haswbstatement:P31=Q5 ',?searchfor)"/] v5 --o bind3 bind3 --as--o v3 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:gsrsearch"--> v3 c3 --"mwapi:gsrlimit"--> c12 c3 --"mwapi:gsrnamespace"--> c14 c3 --"mwapi:gsrprop"--> c16 v4 --"mwapi:apiOutputItem"--> c18 end bind4[/"'zika'"/] bind4 --as--o v5 v4 --"rdfs:label"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P698".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P356".-> v6 end