CaRo

CaRo is a converter for COMBINE archives and Research objects.

Dev

The CaRo tools are being developed at github:

  • Git repository of the Java library: CaRo
  • Git repository of the Web application: CaRoWeb

Give it a try!

The web-tool is deployed at caro.sems.uni-rostock.de. The web interface comes with an API, which supports the following features:

  • /caro converts COMBINE archives into Research objects. Just call, e.g., http://caro.bio.informatik.uni-rostock.de/caro
  • /roca converts Research objects into COMBINE archives. Just call, e.g., http://caro.bio.informatik.uni-rostock.de/roca
  • Send the container via HTTP-POST request. You may supply the container, that is to be converted, as a HTTP-POST request. The request needs to be encoded as multipart/form-data. For example, to convert a Research Object into a COMBINE archive using curl you could call:
    curl -F container='@/path/container.ro' 'http://caro.bio.informatik.uni-rostock.de/caro/roca'
    This will return a JSON object including the information on where to obtain the resulting container. See below for more information on the JSON object.
  • Send the link to the container via HTTP-GET request. For example, to convert a COMBINE archive into a Research Object using curl you would call:
    curl 'http://caro.bio.informatik.uni-rostock.de/caro/caro?remote=http://scripts.sems.uni-rostock.de/getshowcase.php'
    This request will download the archive from http://scripts.sems.uni-rostock.de/getshowcase.php (which actually retrieves the showcase from github) and converts it into a Research Object. The request will will return a JSON object including the information on where to obtain the resulting container. See below for more information on the JSON object.
  • Immediately obtain the resulting container. To immediately retrieve the resulting container just append ?redirect=checkout to your request. For example, using the following request you’ll be forwarded to the actual Research Object without the need to parse the JSON result:
    curl 'http://caro.bio.informatik.uni-rostock.de/caro/caro?remote=http://scripts.sems.uni-rostock.de/getshowcase.php&redirect=checkout'

The JSON object

If you do not append ?redirect=checkout to your request you’ll receive a JSON object in response. This JSON object looks like:

1
2
3
4
5
6
7
8
9
10
11
{
"errors": [
"error number 1",
"another error"
],
"notifications": [
"some general note"
],
"warnings": [],
"checkout":"checkout.key"
}

The fields "errors", "notifications", and "warnings" contain messages telling you something about the conversion process. They might help you debugging your request and fixing errors.
In addition, you’ll find a "checkout" entry containing the checkout keyword. This keyword can be used to download the actual container that’s been produced during the conversion. Let’s assume your checkout keyword is abc123.omex, then you can download the resulting archive at
http://caro.bio.informatik.uni-rostock.de/caro/checkout/abc123.omex.
If you append ?redirect=checkout to the request, the web server will answer with a 302 FOUND and redirect your request to the checkout location.

Brought to you by

Martin Scharm