HiRISE

HiRISE.HiCat.HiVolume
Class Product_File_Filter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by HiRISE.HiCat.HiVolume.Product_File_Filter

public class Product_File_Filter
extends FileFilter

A file filter used to find HiRISE PDS products.

Version:
2.1
Author:
Rodney Heyd UA/PIRL

Field Summary
static String EDR_EXTENSION
          The filename extension for EDR Products
static String ID
          Class Identifier
static String RDR_EXTENSION
          The filename extension for RDR Products
 
Constructor Summary
Product_File_Filter()
           
Product_File_Filter(String Product_Type)
          Construct a new product file filter, specifying the type of product to be filtered for.
 
Method Summary
 boolean accept(File f)
           
 String Get_Extension(File file)
          Returns the file extension of a File.
 String getDescription()
           
 String Set_Product_Type(String New_Product_Type)
          Sets the extension this filter should be looking for based on the product type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class Identifier

See Also:
Constant Field Values

EDR_EXTENSION

public static final String EDR_EXTENSION
The filename extension for EDR Products

See Also:
Constant Field Values

RDR_EXTENSION

public static final String RDR_EXTENSION
The filename extension for RDR Products

See Also:
Constant Field Values
Constructor Detail

Product_File_Filter

public Product_File_Filter()

Product_File_Filter

public Product_File_Filter(String Product_Type)
                    throws Exception
Construct a new product file filter, specifying the type of product to be filtered for.

Parameters:
Product_Type - - the type of product to be filtered for, EDR or RDR.
Throws:
Exception - - if the specified product type is not EDR or RDR.
Method Detail

accept

public boolean accept(File f)
Specified by:
accept in class FileFilter

getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter

Set_Product_Type

public String Set_Product_Type(String New_Product_Type)
                        throws Exception
Sets the extension this filter should be looking for based on the product type. If the product type is "EDR" then the filter will look for IMG files, if the type is "RDR," then the filter will look for LBL and JP2 extensions.

Parameters:
New_Product_Type -
Returns:
the original product type as a string.
Throws:
IOException
Exception

Get_Extension

public String Get_Extension(File file)
Returns the file extension of a File.

Parameters:
file - - The file to get the extension from
Returns:
The extension of a file as a string.

HiRISE

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