ROBOT

- - - - - - - - - -
view on github
getting started
common errors
chaining commands
global options
makefile
plugins
- - - - - - - - - -
annotate
collapse
convert
diff
expand
explain
export
export-prefixes
extract
filter
materialize
measure
merge
mirror
python
query
reason
reduce
relax
remove
rename
repair
report
template
unmerge
validate-profile
verify
- - - - - - - - - -
ROBOT is licensed under the
BSD 3-Clause License.
Theme by orderedlist

Plugins

The set of ROBOT commands can be extended locally with plugins. A ROBOT plugin is a Java archive file (.jar) providing one or more supplementary commands (hereafter called “pluggable commands”).

Using plugins

ROBOT searches for plugins in the following locations:

Installing a plugin is therefore simply a matter of either

Importantly, the basename of the Jar file (without the .jar extension) within the directory will become part of the name of any pluggable command provided by the plugin. For example, if the file is named myplugin.jar and it provides a command called mycommand, that command will be available under the name myplugin:mycommand. Because of that:

Once the plugin is installed, any pluggable command it provides is immediately available to ROBOT. You can check by calling robot without any argument to get it to print the full list of available commands, which will include the commands provided by installed plugins, if any.

Creating plugins

A pluggable command, just like any other ROBOT command, is a Java class that implements the org.obolibrary.robot.Command interface. A plugin is Java archive file that contains at least:

For example, if the command mycommand is implemented in a class named MyCommand in the package org.example.myplugin, the META-INF/services/org.obolibrary.robot.Command file must contain a single line org.example.myplugin.MyCommand.

In addition to the class implementing the command itself, the archive must also provide any additional classes that may be required for the command to work. This must include classes from any external dependency, unless that dependency also happens to be a dependency of ROBOT itself (for example, there is no need for the archive to contain a copy of the classes of the OWL API, since they are already present in the standard distribution of ROBOT).

A more detailed walkthrough of how to create a plugin is available here.

Existing plugins