Getting Started with Simple VIVO
To start using Simple VIVO to manage data in your VIVO, you will need the following:
- A VIVO to use for data management. VIVO is typically deployed at the organizational level, much like a web server. Simple VIVO is used to manage the data in an existing VIVO. The existing VIVO may be "empty" (as delivered VIVO, has a small amount of data pertaining to countries, states and territories of the United States, and data about its own definitions). Simple VIVO can also be used with VIVO Vagrant, a VIVO which can be installed on your local machine. Your VIVO must allow the VIVO SPARQL API to be used. By default, this is turned off. Your system administrator will need to turn it on and provide you with a username and password for you to use to manage data in your VIVO.
- You will need to be able to run Python 2.7 from a command line. If this is new to you, a system administrator can help you prepare your machine, and show you how to use the command line.
- You will need to have the VIVO Pump and Simple VIVO installed on your machine. This is very simple to do. Once
Python is installed, you can type:
pip install vivo-pumpat the command line prompt. - You will need to edit the Simple VIVO configuration file
sv.cfgto provide four pieces of information:- The URL of your VIVO SPARQL API. Your system administrator will have this value
- The username required to access your VIVO SPARQL API
- The password required to access your VIVO SPARQL API
- The URI pattern you would like Simple VIVO to use when created new URI (see below)
With these things in place, you are ready to manage data in VIVO using spreadsheets.
URI patterns
In VIVO, everything has a URI, a Uniform Resource Identifier. Simple VIVO can be used to create new things in
your VIVO, adding grants, or people, or dates, or educational background. Everything that is added will have its
own URI. Simple VIVO makes URI that look like:
PatternNumber
Where pattern is a pattern you supply, and Number is a random number generated by Simple VIVO for each new thing
it creates. Simple VIVO checks to make sure the number it is create
One is not already in use in your VIVO.
Your pattern should like http://yourvivourl/individual/n
Let's looks at each part of the pattern and see what options might exist for you
http:// This is required. All VIVO URI are addresses on the semantic web.
yourvivourl Many organizations have VIVO URLs that look like VIVO.school.edu or something similar. Your
system administrator can provide the URL of your VIVO.
individual This is the VIVO default. Some VIVO sites use alternate words. Your system administrator can
tell you what word is used at your site.
n This is the default. You can use any word or letter you like. You may prefer that dates have uri with
the word date. Person might be used for uri for people.
Let's put all the pieces go ether in an example.
Example: The University of Florida has a VIVO at http://VIVO.ufl.edu. They use the word individual. They
also have all their VIVO uri starting with n. Their uri pattern for all their Simple VIVO work is
http://VIVO.ufl.edu/individual/n
Simple VIVO will make uri that look like http://VIVO.ufl.edu/individual/n883882
Example 2: mythical university has a VIVO at http://profiles.mythical.org. They use the word "u" to refer to
all uri in their system. They use different prefixes for uri referring to different things.
http://profiles.mythical.org/u/date is the prefix they use for dates
http://profiles.mythical.org/u/grant is the prefix they use for grants
And so on
Each uri prefix is put in the config used to manage each type of thing.
Simple VIVO will make uri. That look like http://profiles.mythical.org/u/date774883 for a date,
and http://profiles.mythical.org/u/grant884001 for a grant.
Testing your set up
Once you have all the pieces in place -- a VIVO, Python, the Pump and Simple VIVO, and the four parameters in
your sv.cfg file, you can test your setup by going to a command line, and typing:
python sv.py -a test
sv.py is the name of the Simple VIVO program.
The word python is required. It tells the system "I'm asking you to run a Python program and here's its name"
The sv.py is required. It tells python "the name of the program I would like to run is sv.py and you can
find it in the current directory." If sv.py is not in the current directory, you can change to the directory it is
in to run it, or use a path to indicate where sv.py is located.
The -a test command line parameter tells Simple VIVO that you would like to run the test to see that Simple
VIVO is set up correctly.
If you have python installed and sv.py where python will find it, and you have typed the command line correctly,
Simple VIVO will respond with a list of the parameters configured for Simple VIVO and the results of a connection
test with VIVO. For example:
mymac$ python sv.py -a test
2015-10-28 10:26:31.231997 Start
2015-10-28 10:26:31.319732 Test results
Update definition pump_def.json read.
Source file name pump_data.txt.
Enumerations read.
Filters True
Verbose False
Intra field separator ;
Inter field separator |
VIVO SPARQL API URI http://localhost:8080/vivo/api/sparqlQuery
VIVO SPARQL API username [email protected]
VIVO SPARQL API password xxxxxxxx
VIVO SPARQL API prefix
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
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 swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX swrlb: <http://www.w3.org/2003/11/swrlb#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX c4o: <http://purl.org/spar/c4o/>
PREFIX cito: <http://purl.org/spar/cito/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX fabio: <http://purl.org/spar/fabio/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX ocrer: <http://purl.org/net/OCRe/research.owl#>
PREFIX ocresd: <http://purl.org/net/OCRe/study_design.owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX vitro-public: <http://vitro.mannlib.cornell.edu/ns/vitro/public#>
PREFIX vivo: <http://vivoweb.org/ontology/core#>
PREFIX scires: <http://vivoweb.org/ontology/scientific-research#>
Prefix for RDF file names pump
Uriprefix for new uri http://vivo.school.edu/individual/n
Sample new uri http://vivo.school.edu/individual/n2898507243
Simple VIVO is ready for use.
2015-10-28 10:26:31.949635 Test end
2015-10-28 10:26:31.949723 Finish
mymac$
Notice toward the bottom "Simple VIVO is ready for use." You're good to go!
If things aren't quite right, the test will respond with one or more error messages. The most common errors
have to do with specification of
the configuration file for accessing your VIVO SPARQL API. In some cases, your VIVO may not be accepting
connections, or your username and password may not be authorized, or your uri pattern may be invalid.
Work with your system administrator to get VIVO set up properly and the parameters needed to access VIVO set up
properly in your sv.cfg file.
Tests passed and good to go
With tests passed, you are ready to use Simple VIVO. Please read the introduction to Simple VIVO that follows, and then try one or more examples.