Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First, create a Turtle format file in vivo.home/rdf/display/everytime (you .You may name the file anything you like) containing .  Turtle files typically have a .ttl file type.  Your file should contain the following:

Code Block
@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" .

...

Code Block
Hello, World

in your browser.

Reading the Configuration File

The configuration file begins with a prefix, this is required

Following are two assertions of type for a new entity with the URI :data_distributor_hello.  You can use any URI for your data distributor entity.  You will need to use unique URI for each data distributor entity you create, so a naming convention (see below) may be helpful.

The type assertions are required and declare that the entity is a data distributor, and is a HelloDistributor.  Subsequent examples will use other types of data distributors.

The third assertion says that the entity has the actionName "hello".  This is the API's key for someone calling the API.  The entity will be called when the URL http://mydomain.edu/api/datarequest/hello is visited.  The "/api/datarequest" part of the URL is fixed and indicates you are making a request of the VIVO Data Distribution API.  The final part of the URL is the action name specified in the configuration file.

Managing Configuration Files

...