HiRISE

HiRISE.HiCat.HiVolume
Class Product_Finder

java.lang.Object
  extended by HiRISE.HiCat.HiVolume.Product_Finder

public class Product_Finder
extends Object


Field Summary
static int EXIT_FILE_FAILURE
           
static int EXIT_SUCCESS
           
static int EXIT_UNKNOWN_PRODUCT_TYPE
           
 String Product_Type
          The product type to search for.
 File Root_Directory
          The root directory of the tree of directories to search for products.
 
Constructor Summary
Product_Finder(File Root_Directory, String Product_Type)
           
 
Method Summary
 Vector<Product> Get_Products()
          Get_Products
 Vector listFiles(File directory, boolean recursively)
          Returns the list of files find in the specified directory.
 Vector listFilesAsVector(File directory, boolean recurse)
          Gets a Vector of files contained within the given directory.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Root_Directory

public File Root_Directory
The root directory of the tree of directories to search for products.


Product_Type

public String Product_Type
The product type to search for. This should be EDR or RDR.


EXIT_SUCCESS

public static final int EXIT_SUCCESS
See Also:
Constant Field Values

EXIT_FILE_FAILURE

public static final int EXIT_FILE_FAILURE
See Also:
Constant Field Values

EXIT_UNKNOWN_PRODUCT_TYPE

public static final int EXIT_UNKNOWN_PRODUCT_TYPE
See Also:
Constant Field Values
Constructor Detail

Product_Finder

public Product_Finder(File Root_Directory,
                      String Product_Type)
               throws Exception
Parameters:
Root_Directory -
Product_Type -
Throws:
IOException
Exception
Method Detail

listFilesAsVector

public Vector listFilesAsVector(File directory,
                                boolean recurse)
Gets a Vector of files contained within the given directory. If recurse is true, then the list will be recursive of all directories found in the starting directory.

Parameters:
directory -
recurse -
Returns:
A Vector of files.

listFiles

public Vector listFiles(File directory,
                        boolean recursively)
Returns the list of files find in the specified directory. If recursively is true, then the returned list will be a recursive list of all files found starting at the supplied directory.

Parameters:
directory -
recursively -
Returns:
a Vector of Files

Get_Products

public Vector<Product> Get_Products()
                             throws PVL_Exception
Get_Products

Returns:
A vector of Products found within the root directory tree.
Throws:
PVL_Exception

main

public static void main(String[] args)
Parameters:
args -

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona