Versions Compared

Key

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

...

The query returns a list of all publications along with common citation information.  The publication must have a venue type of bibo:Journal, and the journal must have a label and an issn, otherwise the publication will not be included in the results.  The publication may be of any type (AcademicArticle, Editorial, etc).  The most specific type of the article is identified and its label is included in the results.  The publication must have a date.  The three lines get the VIVO date time value, and its date string, and then parses the date string to return the first four characters of the date string, which is included in the results as year.  Five additional attributes are considered optional.  Publications will be included in the results regardless of whether these attributes (doi, start page, end page, volume, and issue) have values.

Code Block
titleReturn List publications with common citation information for Publications
linenumberstrue
SELECT ?doi ?pub_label ?type_label ?venue_label ?issn ?issue ?startPage ?endPage ?volume ?year
WHERE{
    ?pub vivo:hasPublicationVenue ?venue .
    
    ?venue rdf:type bibo:Journal .
    ?venue bibo:issn ?issn .
    ?venue rdfs:label ?venue_label .

    ?pub rdfs:label $pub_label .
    ?pub vitro:mostSpecificType ?type .
    ?type rdfs:label ?type_label .
  
    ?pub vivo:dateTimeValue ?dtv . 
    ?dtv vivo:dateTime ?dt .
    BIND(SUBSTR(str(?dt),1,4) AS ?year)
    
    OPTIONAL { ?pub bibo:doi ?doi . }
    OPTIONAL { ?pub bibo:pageStart ?startPage . }
    OPTIONAL { ?pub bibo:pageEnd ?endPage . }    
    OPTIONAL { ?pub bibo:volume ?volume . }
    OPTIONAL { ?pub bibo:issue ?issue . }  
}

...

List Authors by Department

Code Block
titleList authors of publications with their departmentsAuthors by Department
linenumberstrue
SELECT ?infoResource_label ?type ?author ?firstName ?lastName ?position_label ?department ?pemail
WHERE {
?infoResource vivo:hasPublicationVenue ?pubVenue .
?pubVenue rdf:type bibo:Journal .
?infoResource rdf:type ?anyType .
?anyType rdfs:label ?type .
?infoResource vivo:informationResourceInAuthorship ?authorship .
?authorship rdf:type vivo:Authorship .
?authorship vivo:linkedAuthor ?authorURI .
?authorURI rdfs:label ?author .
?infoResource rdfs:label ?infoResource_label .
OPTIONAL { $authorURI foaf:firstName ?firstName } .
OPTIONAL { $authorURI foaf:lastName ?lastName } .
OPTIONAL { $authorURI vivo:primaryEmail ?pemail } .
?authorURI vivo:personInPosition ?position .
?position vivo:positionInOrganization $organization .
?organization rdfs:label ?department .
?position rdfs:label ?position_label .

...

In the query below we select people that have at least one publication, but less than five.  VIVO uses "relatedBy" to associate people with authorships that indicate that the person is an author of the paper.  Note that the query insures that ?person is a foaf:Person and ?a is a vivo:Authorship.  relatedBy is used in other contexts so it is very important that we clarify which relatedBy assertions we are interested in.

Code Block
titleList authors People with less than five publications
linenumberstrue
SELECT ?person
WHERE
{
    ?person vivo:relatedBy ?a .
    ?person a foaf:Person .
    ?a a vivo:Authorship . 
}
GROUP BY ?person
HAVING (COUNT(?a) < 5)

...