Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Given a non-complete uri, the get.vivo.org function returns popular attributes of the organization as a list. if the attribute value is not specified in VIVO, the resulting value is NA. Sub organizations are returned as a list. The list has zero length if there are no sub organizations. If there are sub organizations, the list contains the non-complete uri for each one.

Code

Panel

get.vivo.org<-function(raw.uri){
#

  1. Given a raw uri, return attributes of the organization at that uri. subOrganizations
  2. are returned as a list of raw uri.
    #
    uri <- make.vivo.uri(raw.uri)
    x <- xmlParse(uri)
    name <- get.vivo.name(error)
    type <- get.vivo.type(error)
    s <- getNodeSet(x,"//d:hasSubOrganization",c(d="http://vivoweb.org/ontology/core#"))
    subs <- sapply(s,function(el) xmlAttrs(el)["resource"])
    list(name=name,type=type,subs=subs)
    }

Sample run

 

 

Panel

> dentistry.raw<-"http://vivo.ufl.edu/individual/CollegeofDentistry"
> get.vivo.org(dentistry.raw)
$name
[1] "College of Dentistry"

$type
[1
] "College"

$subs
resource
"http://vivo.ufl.edu/individual/Periodontology"
resource
"http://vivo.ufl.edu/individual/Endodontics"
resource
"http://vivo.ufl.edu/individual/Prosthodontics"
resource
"http://vivo.ufl.edu/individual/OralBiology"
resource
"http://vivo.ufl.edu/individual/CommunityDentistryandBehavioralScience"
resource
"http://vivo.ufl.edu/individual/Orthodontics"
resource
"http://vivo.ufl.edu/individual/PediatricDentistry"
resource
"http://vivo.ufl.edu/individual/OperativeDentistry"
resource
"http://vivo.ufl.edu/individual/OralandMaxillofacialDiagnosticSciences"
resource
"http://vivo.ufl.edu/individual/n35294"
resource
"http://vivo.ufl.edu/individual/OralandMaxillofacialSurgery"
>

 

Notes

  • Each entry in the subs list has name "resource" since the uri is found in the RDF resource attribute
  • The UF college of Dentistry was used in this example. It has 11 departments