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