stuppie / WikiDataScape

A WikiData explorer for Cytoscape
6 stars 1 forks source link

To Do #1

Closed stuppie closed 8 years ago

stuppie commented 8 years ago

To do

Extra Features

stuppie commented 8 years ago

Populate an "inverse query" submenu with all properties that link to the object (inverse of the properties submenu) Not sure this is the most efficient way to do this, but it works...

SELECT * WHERE {
  {
    SELECT distinct ?item ?itemLabel ?prop ?propLabel ?vals (datatype (?vals) AS ?type) WHERE {
      hint:Query hint:optimizer "None" .
      values ?item {wd:Q17861702 }
      ?item ?p ?vals .
      ?prop wikibase:directClaim ?p .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
    }
  } UNION {
      hint:Query hint:optimizer "None" .
      values ?vals {wd:Q17861702 }
      ?item ?p ?vals .
      ?prop wikibase:directClaim ?p .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
  }
}