VIVO Mapping process
Semantic extraction
Semantic extraction consists in merging all ORCID data files and extracting the list of properties from them
CONSTRUCT { ?p a owl:ObjectProperty . } WHERE { ?subject ?p ?object . FILTER regex(str(?p), "uqam") . }
ORCID to VIVO Mapping
Mapping ORCID data to the VIVO vocabulary consists in associating ORCID statements to VIVO semantics. For demonstration purposes, three concepts are mapped: the person's name including title; his or her skills and the organizations to which he or she belongs.
The mapping is carried out by three SPARQL queries whose semantics are symbolized by the ORCID and VIVO ontologies.
Mapping rules
ORCID Ontology Snap-shot | get_name.sparql | get_comp.sparql (Extract and map competencies ) | get_org.sparql (Extract and map organization ) |
---|---|---|---|
CONSTRUCT { | CONSTRUCT { | CONSTRUCT { ?IR_IRI obo:ARG_2000028 ?VCARD_ID_IRI . ?VCARD_ID_IRI vcard:hasTitle _:b0 . _:b0 a vcard:Title . _:b0 vcard:title ?role_lang . ?ID_IRI core:relatedBy ?ORG_IRI . ?ORG_IRI rdfs:label ?role_lang . ?ORG_IRI rdfs:label ?role_lang_en . ?ID_IRI a owl:NamedIndividual . ?ORG_IRI a core:FacultyPosition . ?ORG_IRI vcard:organizationalUnitName ?org_name . ?ORG_IRI vcard:title ?role_lang . ?ORG_IRI vcard:title ?role_lang_en . ?ORG_IRI core:relates ?ID_IRI . } WHERE { ?s orcid:orcid-identifier/orcid:path ?ID . BIND (IRI(CONCAT("http://localhost:8080/vivo/individual/", "ID-", ?ID)) AS ?ID_IRI) . ?x orcid:employments/orcid:affiliation-group ?ag . ?ag orcid:summaries/orcid:employment-summary ?es . ?es orcid:organization ?org . ?org orcid:disambiguated-organization/ orcid:disambiguated-organization-identifier ?org_id . ?org orcid:name ?name . ?es orcid:role-title ?role . BIND (IRI(CONCAT("http://localhost:8080/vivo_uqam/individual/", ?org_id)) AS ?ORG_IRI) . BIND (IRI(CONCAT("http://localhost:8080/vivo/individual/", "VCARD-", ?ID)) AS ?VCARD_ID_IRI) . BIND (STRLANG(?role, "fr-CA") AS ?role_lang) . BIND (STRLANG(?role, "en-US") AS ?role_lang_en) . BIND (STRLANG(?name, "fr-CA") AS ?org_name) . } |
Mapping script
#!/bin/bash ################################################################### # Script Name : orcid_vivo_mapping.sh # Description : Mapping ORCID RDF data to VIVO vocabulary. Results are in n3 format for transmission to Kafka. # Args : # Author : Michel Héon # Email : heon.michel@uqam.ca ################################################################### source environment.sh cd records echo "" > $ONTO_ALL_RECORDS for n in *.ttl ; do ((i=i+1)) ((j=j+1)) bn=`basename $n .ttl` echo process $i $bn (sparql --data=$n --query=../sparql/get_name.sparql --results=N-Triples > ${bn}_name.n3 ; cat ${bn}_name.n3 >> $ONTO_ALL_RECORDS) & (sparql --data=$n --query=../sparql/get_org.sparql --results=N-Triples > ${bn}_org.n3; cat ${bn}_org.n3 >> $ONTO_ALL_RECORDS) & (sparql --data=$n --query=../sparql/get_comp.sparql --results=N-Triples > ${bn}_comp.n3 ; cat ${bn}_comp.n3 >> $ONTO_ALL_RECORDS) & if [ $j = "5" ]; then echo 'waiting...' wait ((j=0)) fi done echo "Done!"