The Bulk Downloader application allows direct connection to the PDS-D infrastructure for downloading multiple files or packages of files. The following topics can be found in this section:
Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.
In order to execute Bulk Downloader, the user's environment must first be configured appropriately. This section describes how to setup the user environment on UNIX-based and Windows machines.
This section details the environment setup for UNIX-based machines providing four different methods:
Specify the Shell Script on the Command-Line
The preferred method is to specify the shell script, BulkDownloader , on the command-line. Setting the PATH environment variable to the location of the script, enables the shell script to be executed from any location in the user's machine.
The following command demonstrates how to set the PATH environment variable, by appending to its current setting:
[node:~] setenv PATH ${PATH}:$HOME/bulk-downloader-1.4.0/bin
The tool can now be executed via the shell script as demonstrated in the following example:
[node:~] BulkDownloader <command-line arguments>
Set the CLASSPATH Environment Variable
An alternative method is to set the CLASSPATH environment variable. The following commands demonstrate how to set this variable, by appending to its current setting:
This example for setting the variable, appends the executable jar file found in the lib directory:
[node:~] setenv CLASSPATH ${CLASSPATH}:\ $HOME/bulk-downloader-1.4.0/lib/bulk-downloader-1.4.0.jar [node:~] echo $CLASSPATH
The second command in the example above, will display the current value of the CLASSPATH variable. Please note that the value for the CLASSPATH variable may not contain space characters. Once the CLASSPATH is set, the tool can be executed with the following command:
[node:~] java gov.nasa.pds.bulkdownloader.BulkDownloader <command-line arguments>
Specify the CLASSPATH on the Command-Line
An alternative method to setting the CLASSPATH variable is to specify the java.ext.dirs Java property on the command-line when running the tool each time. This is done by passing the property via the Java "-D" flag as demonstrated in the following example:
[node:~] java -Djava.ext.dirs=$HOME/bulk-downloader-1.4.0/lib \ gov.nasa.pds.bulkdownloader.BulkDownloader <command-line arguments>
Specify the Jar on the Command-Line
Another alternative method is to specify the executable jar file on the command-line when running the tool each time. This is done by passing the jar file specification via the Java "-jar" flag as demonstrated in the following example:
[node:~] java -jar \ $HOME/bulk-downloader-1.4.0/lib/bulk-downloader-1.4.0.jar <command-line arguments>
This section details the environment setup for Windows machines providing four different methods:
Specify the Batch File on the Command-Line
The preferred method is to specify the batch file, BulkDownloader.bat , on the command-line. Setting the PATH environment variable to the location of the file, enables the batch to be executed from any location in the user's machine.
The following command demonstrates how to set the PATH environment variable, by appending to its current setting:
C:\> set PATH = %PATH%;C:\bulk-downloader-1.4.0\bin
The tool can now be executed via the batch file as demonstrated in the following example:
C:\> BulkDownloader <command-line arguments>
Set the CLASSPATH Environment Variable
An alternative method is to set the CLASSPATH environment variable. The following commands demonstrate how to set this variable, by appending to its current setting:
This example for setting the variable, appends the executable jar file found in the lib directory:
C:\> set CLASSPATH=%CLASSPATH%;\ c:\bulk-downloader-1.4.0\lib\bulk-downloader-1.4.0.jar C:\> echo %CLASSPATH%
The second command in the example above, will display the current value of the CLASSPATH variable. Please note that the value for the CLASSPATH variable may not contain space characters. Once the CLASSPATH is set, the tool can be executed with the following command:
C:\> java gov.nasa.pds.bulkdownloader.BulkDownloader <command-line arguments>
Another way of setting the CLASSPATH is via the Windows Control Panel . If viewing this document in PDF form, see the appendix for details on this method.
Specify the CLASSPATH on the Command-Line
An alternative method to setting the CLASSPATH variable is to specify the java.ext.dirs Java property on the command-line when running the tool each time. This is done by passing the property via the Java "-D" flag as demonstrated in the following example:
C:\> java -Djava.ext.dirs=c:\bulk-downloader-1.4.0\lib \ gov.nasa.pds.bulkdownloader.BulkDownloader <command-line arguments>
Specify the Jar on the Command-Line
Another alternative method is to specify the executable jar file on the command-line when running the tool each time. This is done by passing the jar file specification via the Java "-jar" flag as demonstrated in the following example:
C:\> java -jar \ c:\bulk-downloader-1.4.0\lib\bulk-downloader-1.4.0.jar <command-line arguments>
This section describes how to run Bulk Downloader.
The Bulk Downloader allows one command-line argument. That argument may be a file specification for a query list file. See the Query List File Format sub-section below for details on the file format.
The Bulk Downloader can be launched as described in the Tool Setup section. The following example uses the batch/shell script and passes in a query list file specification argument:
[node:~] BulkDownloader example.ql
If the Bulk Downloader is launched with a query list file, as in the example above, the Query List tab in the application should be populated. If the Query List tab is empty, the user will need to populate it by opening a query list file from their desktop or by manually adding entries using the Add Row menu item under the Edit menu. The user can then edit the new row. The Product Server and Return Type are selected from a drop down box. The Online File Specification Name is entered manually by the user.
To start the download, select the Start Download from the Edit menu to start downloading the products. The Download Status tab is displayed and a dialog window pops up giving you the opportunity to change the directory to receive the product downloads. After making your choice the download begins. You can select the Run Log tab to view the status of all product downloads. If a connection is dropped, the download will retry 4 times. If any errors occur, the product download is skipped and the application continues with the next download.
As each product is downloaded, the checkbox in the Query List tab is checked. If any query fails downloading, the box is not checked. To repeat downloading a product, uncheck its entry.
The user can use the Save File menu item from the File menu to save the query list. If there are problems downloading some of the products, you can delete the successful downloads from the query list and save the remaining query list to try later.
The following is an example of a Query List file:
BulkDownloader Query List v1.2 object=PDS.CN.Product&keywordQuery=OFSN+%3D+data/ody-m-rss-1-raw-v1.0/odrs_0001/eop/ \ 11352136.lbl+AND+RT+%3D+PDS_LABEL object=PDS.CN.Product&keywordQuery=OFSN+%3D+data/ody-m-rss-1-raw-v1.0/odrs_0001/eop/ \ 11352136.eop+AND+RT+%3D+RAW object=PDS.CN.Product&keywordQuery=OFSN+%3D+data/ody-m-rss-1-raw-v1.0/odrs_0001/eop/ \ 11352136.lbl+AND+RT+%3D+PDS_ZIP object=PDS.CN.Product&keywordQuery=OFSN+%3D+data/ody-m-rss-1-raw-v1.0/odrs_0001/eop/ \ +AND+RT+%3D+PDS_ZIPD
The first line identifies the file as a .ql file. The version identifier is specific to the file format and not the version of the application. The following lines specify the product server, online file specification name and the return type for products to be downloaded.
The Graphical User Interface (GUI) of Bulk Downloader allows the user specify and manage product downloads. After launching the tool with the method described in the Tool Execution section above, the following window should appear on the user's desktop:
The main window also consists of the following menus:
Other controls include the Query List and Run Log tabs contain table data that can be sorted by clicking on the column title. The first column can be used to return the sort to the original order.