Install the API in VIVO by following these steps:
In these instructions, {VIVO} and {Vitro} are used to indicate the paths to the directories of the VIVO distribution.
More details are in the sections below.
Note: These instructions describe how to install a stable release of the API. To install a (non stable) SNAPSHOT, use these instructions instead.
The JAR file is located in the Snapshots repository at Sonotype.org. You can browse through the directory structure to find the most recent snapshot for the API, and download the JAR file.
Alternatively, if you have Maven installed on your machine, you can use this command to fetch the most recent snapshot to the local repository on your machine:
mvn org.apache.maven.plugins:maven-dependency-plugin:get \ -DgroupId=edu.cornell.library.scholars \ -DartifactId=data-distribution-api-vivo_1_08 \ -Dversion=1.1 \ -Dtransitive=false
When maven completes, you will find the JAR file here:
~/.m2/repository/edu/cornell/library/scholars/data-distribution-api-vivo_1_08/1.1/data-distribution-api-vivo_1_08-1.1.jar
Copy or move the JAR file to your project’s top-level lib directory.
Create a configuration file for the example distributor. The file will contain RDF data that tells the Data Distributor controller how to respond to requests. The file must be created in your VIVO distribution (or your third tier) in {VIVO}/rdf/display/everytime.
For this example, create a file named HelloDistributorConfig.ttl:
@prefix : <http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#> . :data_distributor_hello a <java:edu.cornell.library.scholars.webapp.controller.api.distribute.DataDistributor> , <java:edu.cornell.library.scholars.webapp.controller.api.distribute.examples.HelloDistributor> ; :actionName "hello" .