Example under construction – do not attempt to use

 

The Atkinson Center for a Sustainable Future at Cornell sent us a list of 220 Faculty Fellows to add to their page in VIVO, and to then use for a query of recent publications by these faculty.

Steps for ingest

  1. Sent a .csv file having only 1 column of net ids
  2. Leave the header row on -- the column header is used together with the class Fellow in the ingest tools to create the <http://acsf#fellow_NetID> property (see below)
  3. Put the .csv file in a web-accessible directory (http://ivy.mannlib.cornell.edu/ontology/acsf-fellows-netids-20101103.csv
  4. Inspect a VIVO person via "raw statements with this subject as header" to see what property has the net id alone, not with @cornell.edu -- <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#netId> (note, however, that there may be multiple statements, one a plain literal and one with "gsa1"^^<http://www.w3.org/2001/XMLSchema#string>
  5. Make a new model -- call it acsfFellows
  6. Ingest tools > Convert CSV to RDF


7. Create a second destination model, acsfProps, to construct a property (we had skipped right to #8, but since there were duplicate hr:netId statements we ended up with extra Roles -- since the roles are created as differently numbered blank nodes, the usual assumption that a second assertion of the same subject-property-object relationship won't duplicate an existing one doesn't apply. Input models include the webapp model and the acsfFellows model, with acsfProps the output model.

Query for Step #7 (use the Execute SPARQL Construct option on the Ingest Tools menu)

CONSTRUCT {
?person <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .
}
WHERE {
?fellow <http://acsf#fellow_NetID> ?netId .
?person hr:netId ?netId .
}

Message should come back, 215 statements CONSTRUCTed

sample results:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://vivo.cornell.edu/individual/individual6063> <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .
<http://vivo.cornell.edu/individual/individual5825> <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .
<http://vivo.cornell.edu/individual/individual5681> <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .


8. Now create the roles based on the direct property assertions, with the destination model acsfRoles

Source models are the webapp and the acsfProps (shouldn't need acsfFellows). Output model is acsfRoles.

Query #2

CONSTRUCT {
_:role rdf:type vivo:FacultyFellowRole .
_:role rdf:type core:MemberRole .
?person core:hasMemberRole _:role .
_:role rdfs:label "Faculty Fellow" .
_:role core:memberRoleOf ?person .
_:role core:roleIn <http://vivo.cornell.edu/individual/individual32077> .
<http://vivo.cornell.edu/individual/individual32077> core:relatedRole _:role .
_:role rdf:type vitro:Flag1Value1Thing .
}
WHERE {
?person <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .
}

1790 statements CONSTRUCTed

CONSTRUCT \{
_:role rdf:type vivo:FacultyFellowRole .
_:role rdf:type core:MemberRole .
?person core:hasMemberRole _:role .
_:role rdfs:label "Faculty Fellow" .
_:role core:memberRoleOf ?person .
_:role core:roleIn <http://vivo.cornell.edu/individual/individual32077> .
<http://vivo.cornell.edu/individual/individual32077> core:relatedRole _:role .
_:role rdf:type vitro:Flag1Value1Thing .
\}

WHERE \{
?person <http://acsf#fellowIn> <http://vivo.cornell.edu/individual/individual32077> .
\}

1790 statements CONSTRUCTed

sample output:
{code}
<http://vivo.cornell.edu/individual/individual5655>
<http://vivoweb.org/ontology/core#hasMemberRole>
_:b4 .


_:b4 rdf:type <http://vivoweb.org/ontology/core#MemberRole> , <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Flag1Value1Thing> , <http://vivo.library.cornell.edu/ns/0.1#FacultyFellowRole> ;
rdfs:label "Faculty Fellow" ;
<http://vivoweb.org/ontology/core#memberRoleOf>
<http://vivo.cornell.edu/individual/individual5655> ;
<http://vivoweb.org/ontology/core#roleIn>
<http://vivo.cornell.edu/individual/individual32077> .
{code}


9. Then name the roles

Create a new model, acsfRolesNamed

!RenameBlankNodes.png!


sample output:
{code}
<http://example.org/a3319110>
rdf:type <http://vivoweb.org/ontology/core#MemberRole> , <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Flag1Value1Thing> , <http://vivo.library.cornell.edu/ns/0.1#FacultyFellowRole> ;
rdfs:label "Faculty Fellow" ;
<http://vivoweb.org/ontology/core#memberRoleOf>
<http://vivo.cornell.edu/individual/individual22659> ;
<http://vivoweb.org/ontology/core#roleIn>
<http://vivo.cornell.edu/individual/individual32077> .

<http://example.org/a6173386>
rdf:type <http://vivoweb.org/ontology/core#MemberRole> , <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Flag1Value1Thing> , <http://vivo.library.cornell.edu/ns/0.1#FacultyFellowRole> ;
rdfs:label "Faculty Fellow" ;
<http://vivoweb.org/ontology/core#memberRoleOf>
<http://vivo.cornell.edu/individual/individual8757> ;
<http://vivoweb.org/ontology/core#roleIn>
<http://vivo.cornell.edu/individual/individual32077> .
{code}

9. Assign permanent URIs

Make a new model, acsfRolesPermanentURIs

On the Manage Jena models screen, there is a button with each model labeled "generate permanent URIs"

Click that for the acsfRolesNamed file and fill out the form as follows:

!AssignPermanentURIsToResources.png!

Sample Output (likely will not appear in this order):

{code}
<http://vivo.cornell.edu/individual/DonaghyKieran>
<http://vivoweb.org/ontology/core#hasMemberRole>
<http://vivo.cornell.edu/individual/n24882> .


<http://vivo.cornell.edu/individual/n24882>
rdf:type <http://vivoweb.org/ontology/core#MemberRole> , <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Flag1Value1Thing> , <http://vivo.library.cornell.edu/ns/0.1#FacultyFellowRole> ;
rdfs:label "Faculty Fellow" ;
<http://vivoweb.org/ontology/core#memberRoleOf>
<http://vivo.cornell.edu/individual/DonaghyKieran> ;
<http://vivoweb.org/ontology/core#roleIn>
<http://vivo.cornell.edu/individual/individual32077> .
{code}


10. Add RDF to model

!addRDF.png!

1720 statements

The data should show up in VIVO now.

  • No labels