The pds-cdf is a Java class library for reading file stored in the Common Data Format (CDF) With the library you can access all the metadata in the CDF file. It is also designed to integrate into tools based on Apache Velocity .
The pds.cdf library was developed using Java and will run on any platform with a supported Java Runtime Environment (JRE). The software was specifically developed under Java version 1.6 and has only been tested with this version. You can determine which version of Java you are running with the command:
% java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
Download the pds-cdf package from the IGPP web site To use the jar file, first unbundle the distribution package, then place jar files in the "jar" folder in one of the folders on your Java search path. The package comes with convenience scripts in the "bin" folder which allows running the jar files without system wide installation.
For system wide installation the installation directory may vary from environment to environment but in UNIX-based environments it is typical to install software packages in the /usr/local directory and in Windows-based environments it is typical to install software packages in the C:\Program Files directory.
% jar -xvf pds-cdf-1.0.11.jar
The unzip will result in the creation of the pds-cdf-1.0.11 directory with the following directory structure:
A README file directing the user to the available documentation for the project.
The copyright notice from the Regents of the University of California detailing the restrictions regarding the use and distribution of this software. Although the license is strictly worded, the software has been classified as Technology and Software Publicly Available (TSPA) and is available for anyone to download and use.
This directory contains batch and shell scripts for executing the tool.
This directory contains the jar file and any necessary supporting jar files.
This directory contains documentation on the classes in the pds-cdf jar file. To view the documentation load the "index.html" file into a web browser.
Shell scripts to run the tool are in the "bin" directory in the distribution. Script to support both Linux systems and Windows systems are provided.
The available tools are:
Scan a CDF file and determine if the content is compliant with archive requirements. Checks include if the CDF files meets requirements specified for CDF tools, ISTP/CDF and PDS archiving.
Scan a CDF file and show the data block information.
Parse a CDF file and create lists of records, attributes and variables defined in the file.
For all the tools, issuing the command with no arguments will provide additional information.
The CDF parser is also compatible as a plug-in for tools that use the Apache Velocity template processing engine. One such tool is the IGPP Docgen tool. An example on how to use Docgen with CDF files can be found here .