Client code example
We have implemented a code example (using the Java programming
language) to be used as a simple AIO client.
Download it from here and extract the content of the tar file on your local disk.
You will find both the source and the compiled code of our example. We have implemented two different actions, single product retrieval and multiple products retrieval. The first one will retrieve one single file (though for that we will need its unique identifier), while the second will retrieve all the files that match the result of a query.
The syntax for both options is:
Single product retrieval:
Multiple products retrieval:
The single product option will simply make an http request to the SSA and retrieve one file. The multiple products request will make several requests. One to execute the query and one for each of the identifiers returned from it.
It is important to note that in the multiple products request we use pagination in order to prevent scalability problems in the client side. If the number of records that fulfill the query is greater than the defined page size (internally set to 1000), the system makes several different requests to retrieve them all.
Let's see some examples of its use:
For single product retrieval, the equivalent command line syntax to:
Where "Server name" is the http server location (ssa.esac.esa.int/ssa/ for the operational archive) and the "value" of the observation id is the observation unique identifier.
For multiple product retrieval, the equivalent command line syntax to this sequence of actions:
- Look for the metadata of observations matching this
- For each observation details returned in VOTABLE format, retrieve the observation file:
Where "Server name" is the http server location (ssa.esac.esa.int/ssa/ for the operational archive) and the "value" of the observation id is the observation unique identifier. All retrieved files will be stored in the folder "ssaFiles".
If you work on UNIX, we provide inside the package a sh script with all the default values inside, so you do not need to enter them in the command line after you set them inside
Where the files will be created in the folder: "JanuaryDirectory"
Please feel free to take this code example and modify it to suit your application needs. This is a Java example but any other language could be used for the same purpose.