Given a raw URI for a publication RDF page in VIVO, return basic publication attributes. This function does not return enough attributes to make a citable publication reference. Intended use is for publication metrics at the person and organizational level.
Code
get.vivo.publication<-function(raw.uri){
#
- Given a raw.uri (without the rdf filetype) of a VIVO publication RDF page,
- return basic facts about the publication. Dereference as needed. Missing
- attributes are returned as NA
#
uri <- make.vivo.uri(raw.uri)
x <- xmlParse(uri)
title <- get.vivo.attribute(x,"label","http://www.w3.org/2000/01/rdf-schema#")
authors <- length(getNodeSet(x,"//d:informationResourceInAuthorship",c(d="http://vivoweb.org/ontology/core#")))
bibo.type <- get.vivo.type(x,vocab="bibo")
# - deref the publication venue for its name
#
xns<-getNodeSet(x,"//d:hasPublicationVenue",c(d="http://vivoweb.org/ontology/core#"))
if (length(xns)h1. 0) venue<-NA
else {
venue.uri <- make.vivo.uri(xmlGetAttr(xns1,"rdf:resource"))
xv<-xmlParse(venue.uri)
venue <- get.vivo.attribute(xv,"label","http://www.w3.org/2000/01/rdf-schema#")
}
list(title=title,authors=authors,bibo.type=bibo.type,venue=venue)
$authors
1 6
$bibo.type
1 "AcademicArticle"
$venue
- We are not returning the author names.
- No date available for the publication. Will need to investigate further.
- In the sample run above, the publication did not have a venue.