*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation

SPARQL: Tools, Tips, Sample queries

This page is just starting out and we hope can become a resource for useful snippets of information shared among members of the community.

Note that we have a Tools page in Sourceforge that lists more substantial contributions and extensions to VIVO.

Useful SPARQL queries

A little old but useful: SPARQL Queries for Data Management

finding instances having only a single rdf:type assertion

  1. This example query looks for individuals that have
  2. ONLY a vivoc:AcademicDegreeGrantingAgent type assertion
  3. Tested by substituting vivo:Address and looking at 1 of the results

CONSTRUCT {
?s rdf:type vivoc:AcademicDegreeGrantingAgent .
}
WHERE
{
GRAPH <http://vitro.mannlib.cornell.edu/default/vitro-kb-2> {
?s rdf:type vivoc:AcademicDegreeGrantingAgent .
OPTIONAL {
?s rdf:type ?type .
FILTER (?type != vivoc:AcademicDegreeGrantingAgent )
}
FILTER (!bound(?type))
}
}

  • No labels