Overview
This installation procedure can be used to install the Course Reproducible Harvest application on a Debian Lenny operating system by a system administrator. This utility must be installed on the same server as the Harvester in order to function. This installation includes instructions for configuring the Harvester for Course Harvesting.
Installation
Prerequisites
- Debian Lenny or Newer Operating System (Linux OS)
- VIVO 1.2.x installed and configured
- Harvester latest version Installed and configured to communicate with the VIVO database.
- Mail transfer agent (IE. Exim4) configured for sending outbound mail
UF-Specific Prerequisites
- coursevivo.xlsx : Excel sheet that contain courses information in following format.File name should be coursevivo.xlsx
Example 20088 2033 C 66735222 Saini, Mayank COP5555 Operating Systems Principle
Column header.
TERM, SECT, MEET_NO, INS_UFID, INSTRUCTOR, CRS, CRS_TITLE - UfVIVO Course Ontology : Ontology specific to University of Florida courses.
- New Academic Terms should be added before running harvest.
Course harvest configuration
- cd /usr/share/vivo/harvester/example-scripts/example-courses
- Ensure that /usr/share/vivo/harvester/example-scripts/example-images/vivo.model.xml settings match setting in VIVO’s deploy.properties file
- nano vivo.model.xml
- Set the username in: USERNAME
- Set the password in: PASSWORD
- Update VIVO ontology to include UfVIVO course ontology
- Move required files
- cd /usr/share/vivo/harvester/example-scripts/exampl-courses/
- mkdir /usr/share/vivo/harvester/example-scripts/example-courses/course-input
- Copy coursevivo.csv ./course-input
- Configure run-courses.sh shell script
- nano run-courses.sh
- EMAIL_RECIPIENT=emaillogrecipienemailaddress@ufl.edu
- VIVO_LOCATION_IN_TOMCAT_DIR=”Provide the path of vivo located in your tomcat”
- HARVESTER_INSTALL_DIR=”Provide path to harvester installation directory”
Harvest Courses
- sudo bash run-courses.sh
- Wait for console output to state “Successfully Harvested Courses” (This may take several minutes depending on the number of people in VIVO and course data)
- Review Courses , Course Sections in VIVO web application
- Review images in VIVO web application
- Review Harvester log file in /usr/share/vivo/harvester/example-scripts/example-courses/logs/example-courses..DATETIME.log
- Review email-log, for Pre- harvest and Post- harvest statistics
Schedule as CRON Job
Addendum
Validating CSV File
-
- Look for invalid character in CSV file, characters like single quotes and double quotes must be escaped. Invalid characters in the input causes translation to fail.
Example check.
- 1. vi coursevivo.xls
Press esc
replace all single quotes with double single quotes
:%s/'/' '/g
- 2. check if there is a double quote inside any column value. Print line number and faulty values for such file.
.awk 'BEGIN {FS=OFS=","}{if ( $1 ~ /"/ ) {print NR " " $1," " $2};}' coursevivo.xls
Adding Uf VIVO Course Ontology
- Get the course-ontology from UF vivo group
- Perform the following steps
- STEP 1
- Go to VIVO Site Admin -> Click on Ontology list -> Click on Add new Ontology , for all of the following prefix add data to Ontology name, Namespace URI ,Namespace prefix
- For example for prefix - xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
- Ontology name =geo
- Namespace URI=http://aims.fao.org/aos/geopolitical.owl#
- Namespace prefix=geo.
- Repeat above for all of the following prefixes
xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:ero="http://purl.obolibrary.org/obo/"
xmlns:event="http://purl.org/NET/c4dm/event.owl#"
xmlns:pvs="http://vivoweb.org/ontology/provenance-support#"
xmlns:dcelem="http://purl.org/dc/elements/1.1/"
xmlns:core="http://vivoweb.org/ontology/core#"
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:ufVivo="http://vivo.ufl.edu/ontology/vivo-ufl/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:swrl="http://www.w3.org/2003/11/swrl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
- For example for prefix - xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
- Go to VIVO Site Admin -> Click on Ontology list -> Click on Add new Ontology , for all of the following prefix add data to Ontology name, Namespace URI ,Namespace prefix
- STEP 1
- Perform the following steps
- STEP 2
- Go to site admin -> Advanced Data Tools ->Add/Remove RDF data ->Select Option " add mixed RDF (instances and/or ontology)" -> Upload Ontology
Adding versions of the list view config and template for the vivo:dateTimeInterval property
- Go to site admin -> Advanced Data Tools ->Add/Remove RDF data ->Select Option " add mixed RDF (instances and/or ontology)" -> Upload Ontology
- listViewConfig-dateTimeInterval.xml can be copied from the repository in vivo project in productMods/config.
- propStatement-dateTimeInterval.ftl an be copied from the repositoryin vivo project in productMods/templates/freemarker/body/partials/individual.
- Place these files in your in your source directory and redeploy (copy to tomcat directories, no restart of tomcat needed), OR you can just place them directly in the appropriate tomcat directories, and they will take effect.
- listViewConfig-dateTimeInterval.ftl goes in webapps/vivo/config and propStatement-dateTimeInterval.ftl goes in webapps/vivo/templates/freemarker/body/partials/individual.
- Place these files in your in your source directory and redeploy (copy to tomcat directories, no restart of tomcat needed), OR you can just place them directly in the appropriate tomcat directories, and they will take effect.
Analytics
- Total number of Courses in VIVO
**SELECT count(?URI)
WHERE
{
?URI rdf:type ufvivo:Course .
}
- Total number of Course-Section in VIVO
**SELECT count(?URI)
WHERE
{
?URI rdf:type ufvivo:CourseSection .
}
- Total number of people in VIVO
**SELECT count(?person)
where
{
?person rdf:type foaf:Person .
}
- Total number of people with UFID's in VIVO
**SELECT count(?URI)
WHERE
{
?URI rdf:type foaf:Person .
?URI ufVivo:ufid ?UFID .
}
- Total number of people with out UFID's in VIVO
**SELECT count(?u)
WHERE
{
?u rdf:type foaf:Person .
OPTIONAL {?u ufVivo:ufid ?y . }
FILTER (!bound(?y))
}