Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 _MaintenanceManagement

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 {

panel
Panel
No Format
Panel

?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))
}
}

...

Panel
noformat