Versions Compared

Key

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

...

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

 

 

noformat
Panel

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

$type

Panel

[1] "College"

$subs

Panel

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"
>

No Format
 

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