
Description:
    This program exports the contents of a CDF file(s) into a single Json file.
    The Json file will have an ".json" extension if it is not specified. 
 
Usage: java CDF2Json [Options] [cdfFile1 cdfFile2 ...]

    cdfFile1 cdfFile2 .... 
       Command line input CDF file(s) for conversion. A maximum of 100 
       files can be specified.
       If the "output" option is not specified, the first file in the list is
       used as the the output Json file name.
       Alternatively, use "fileNames" option to specify a text file
       that contains the CDF name(s) for conversion. Command line file(s) and
       fileNames option are mutually exclusive.
 
Options:
 
   -fileNames:fileNames
       fileNames is a text file that contains the input CDF file name(s)
       for converting into a Json file. With this option, there is no need to
       enter the file(s) in the command line.If the output Json file is not
       specified, this file is used as the name of the Json output.
 
   -globalAttrs:[yes | no].
      -globalAttrs:yes, the default, extracts all global attributes.
      -globalAttrs:no doesn't extract global attributes.
 
   -varAttrs:[yes | no]. 
      -varAttrs:yes, the default, extracts each variable's attributes.
      -varAttrs:no doesn't extract variable's attributes.
 
   -entryDataType:[yes | no].  
     Only applicable when "-globalAttrs:yes" or "-varAttrs:yes" 
     The entry value is shown, with or without data type.
      -entryDataType:yes shows entry's non-char data type.
      -entryDataType:no, the default, doesn'tshow entry's data type.
      Note: This is new option. A Json file with entry's data type will not
            be handled by the older Json2CDF program.

 
   -vars:var1,var2,....
      -vars:var1,var2,... extracts only the specified variables with
                           variable names separated by a single ','.
 
   -varData:[yes | no].
      -varData:yes, the default, extracts each variable's data
      -varData:no doesn't extract record-varying variable's data
 
   -format:[yes | no | prefer].
      -format:yes uses variable attribute FORMAT to encode data
      -format:prefer, the default, uses variable attribute FORMAT to encode data.
                     However, if its FORMAT is not properly defined, it
                     is treated as "no".
      -format:no uses Java internal encoding to encode data
      Note: The format is only relevant to floating-point values.
 
   -encodeepoch:[yes | no].
      -encodeepoch:yes, the default, encodes CDF epoch data values in time string
      -encodeepoch:no  shows CDF epoch values in their original data form
 
   -[output | json]:outputFileName
      The name of the input CDF file is used as the default output file
      name.  Use this option to specify a different output file name.
 
   -[showProgress | Progress]
      This option displays the processing progress on the screen.
      It shows how many CDF variables are there to process and which
      variable is being processed.
 
   -debug
      Displays the specifications to run the application.
 
   -withZ
      Adding "Z" to the encoded CDF epoch data of ISO 8601 form.

   -delete
      Over-ride the existing Json file.

   -nofullpath
      Only use the file name portion of the entered full path name as
      the key to each CDF in the Json output. 

   -showfile
      Display the file name(s) being processed.

NOTE:

  1. Variable's non-varying dimension(s) is ignored. A varying dimension
     with a size of only 1 is also considered a non-varying dimension.
  2. NaN|-NaN and INF|-INF, valid floating-point values in CDF, but are not
     allowed in Json. They are replaced by strings "NaN"|"-NaN" and 
     "INF"|"-INF". Try to avoid using any of these as it might cause
     unexpected results if such Json file is converted back to CDF.
  3. Only value, without the data type, from meta-data is presented in the
     Json output.
  4. Use CDFJsonReader to display the Json file in a easy to read form.

Examples: 
   java CDF2Json test.cdf (same as java CDF2Json -json:test.json test.cdf)
   java CDFJsonReader test.json 
 
The CDF's Json file has the following form: 
 
 CDFname1:    <== CDF file name key
   CDFFileInfo:
     FileVersion:.....
     Format:.....
     Majority:...
     Encoding:.....
   CDFglobalAttributes:
     Gattr_name1:
       entry#:value
       ...
       ...
     Gattr_name2:
       entry#:value
       ...
       ...
   ...
   ...
   CDFVariables:
     VarName1:  <== Variable name key
       VarDescription:
         DataType:....
         ...
         ...
       VarAttributes:
         VALIDMIN:.... or VALIDMIN: DataType:.. Value:...
         VALIDMAX:.... or VALIDMAX: DataType:.. Value:...
         ...
         ...
       VarData:
       ...
     VarName2:
       VarDescription:
         DataType:....
         ...
         ...
       VarAttributes:
         VALIDMIN:....
         VALIDMAX:....
         ...
         ...
       VarData:
         ...
   EmptyAttributes:  <== Exists if there are attributes defined but no values
     GlobalAttributes: [...]
     VariableAttributes: [...]
 
 CDFname2:
   ...
   ...
 ...
 ...
 
