Versions Compared

Key

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

...

Miscellaneous 

Retrieve the positions for a single person

The query begins by finding the person of interest – here the person is identified by the value of a label.  This may not return a single person.  But for this example, let's assume it does.  We could construct a query which selected the person based on their primary email or their ORCiD, or some other identifier.  The query then gets all the relatedBy assertions for this person.  VIVO uses relatedBy in many settings.  The query then limits the results to insure that the relatedBy assertions relate a foaf:Person to a vivo:Position.  The query then gets the labels for each position.

Note:  The use of SELECT * returns all variables used in the query.  

Code Block
titleRetrieve the positions for a single person
linenumberstrue
SELECT *
WHERE {
    ?person rdfs:label  'Conlon, Michael' .
    ?person vivo:relatedBy ?position .
    ?person a foaf:Person .
    ?position a vivo:Position .
    ?position rdfs:label ?postionposition_label .
}