HiRISE

HiRISE.HiCat.HiVolume
Class Release_RDR_Extras

java.lang.Object
  extended by HiRISE.HiCat.HiVolume.PDS_Release
      extended by HiRISE.HiCat.HiVolume.Release_RDR_Extras
All Implemented Interfaces:
Releasable

public class Release_RDR_Extras
extends PDS_Release
implements Releasable

This class implements the Releasable interface for HiRISE RDR Extras products, and is responsible for both creating lists of RDR Extras products that are available for release, and performing the release procedure for these products.

The release procedure consists of creating symbolic links within the HiRISE Extras area of the HiRISE PDS Volume for each extras file to be released and updating the Proffered_Extras_Products table within the HiCat database to indicate the files have been released.

Version:
1.10
Author:
Rodney Heyd UA/HiRISE/PIRL
See Also:
Releasable, PDS_Release

Field Summary
static int EXIT_CONFIGURATION_ERROR
           
static int EXIT_DATABASE_ERROR
           
static int EXIT_INVALID_COMMAND_LINE_SYNTAX
           
static int EXIT_IO_ERROR
           
static int EXIT_SUCCESS
           
static String ID
           
 
Fields inherited from class HiRISE.HiCat.HiVolume.PDS_Release
Property_Changer
 
Fields inherited from interface HiRISE.HiCat.HiVolume.Releasable
ABSOLUTE_MAXIMUM_ORBIT, ANAGLYPH_FILE_TYPES_TABLE_PARAMETER_NAME, ANAGLYPH_GROUP, ANAGLYPH_ROOT_PARAMETER_NAME, ANAGLYPH_TABLE_PARAMETER_NAME, ANAGLYPHS, DEFAULT_CONFIGURATION_FILE_NAME, DEFAULT_MAXIMUM_ORBIT_NUMBER, DEFAULT_MINIMUM_ORBIT_NUMBER, DTM, DTM_CUMINDEX_FILE_PARAMETER_NAME, DTM_CUMINDEX_LABEL_PARAMETER_NAME, DTM_EXTRAS, DTM_EXTRAS_FILE_TYPES_TABLE_PARAMETER_NAME, DTM_EXTRAS_PRODUCTS_TABLE_PARAMETER_NAME, DTM_EXTRAS_ROOT_PARAMETER_NAME, DTM_GROUP, DTM_INDEX_FILE_PARAMETER_NAME, DTM_INDEX_LABEL_PARAMETER_NAME, DTM_PRODUCTS_TABLE_PARAMETER_NAME, DTM_ROOT_PARAMETER_NAME, EDR, EDR_CUMINDEX_FILE_PARAMETER_NAME, EDR_CUMINDEX_LABEL_PARAMETER_NAME, EDR_EXTRAS, EDR_GROUP, EDR_INDEX_FILE_PARAMETER_NAME, EDR_INDEX_LABEL_PARAMETER_NAME, EDR_PRODUCTS_TABLE_PARAMETER_NAME, EDR_ROOT_PARAMETER_NAME, EXTRAS_FILE_TYPES_TABLE_PARAMETER_NAME, EXTRAS_GROUP, EXTRAS_PRODUCTS_TABLE_PARAMETER_NAME, EXTRAS_ROOT_PARAMETER_NAME, HIVOLUME_GROUP, INDEX_TABLE_UPDATE_PROPERTY_NAME, MAX_VERSION_ID_ALIAS, MAXIMUM_UPDATES_BEFORE_COMMIT, PDS_ANAGLYPH_ROOT_PARAMETER_NAME, PDS_DTM_EXTRAS_ROOT_PARAMETER_NAME, PDS_DTM_ROOT_PARAMETER_NAME, PDS_EDR_ROOT_PARAMETER_NAME, PDS_EXTRAS_ROOT_PARAMETER_NAME, PDS_RDR_ROOT_PARAMETER_NAME, PREPARE_STATUS_PROPERTY_NAME, PREPARE_STATUS_ROW_PROPERTY_NAME, PRODUCT_TABLES_GROUP, PROFFER_PRODUCT_PROPERTY_NAME, PROFFER_STATUS_COUNT_PROPERTY_NAME, PROFFERED_ANAGLYPH_PRODUCTS_TABLE_PARAMETER_NAME, PROFFERED_DTM_EXTRAS_PRODUCTS_TABLE_PARAMETER_NAME, PROFFERED_DTM_PRODUCTS_TABLE_PARAMETER_NAME, PROFFERED_EDR_PRODUCTS_TABLE_PARAMETER_NAME, PROFFERED_EXTRAS_PRODUCTS_TABLE_PARAMETER_NAME, PROFFERED_RDR_PRODUCTS_TABLE_PARAMETER_NAME, RDR, RDR_CUMINDEX_FILE_PARAMETER_NAME, RDR_CUMINDEX_LABEL_PARAMETER_NAME, RDR_EXTRAS, RDR_GROUP, RDR_INDEX_FILE_PARAMETER_NAME, RDR_INDEX_LABEL_PARAMETER_NAME, RDR_PRODUCTS_TABLE_PARAMETER_NAME, RDR_ROOT_PARAMETER_NAME, RELEASED_VERSION_COLUMN_ALIAS, SEARCH_STATUS_COMPILING_DATA, SEARCH_STATUS_COMPLETE, SEARCH_STATUS_CONSTRUCT, SEARCH_STATUS_EXECUTE, SEARCH_STATUS_PROPERTY_NAME, SEARCH_STATUS_START, SKIP_MISSION_PHASES_PARAMETER_NAME, Status_Hash, UNRELEASED_COLUMN_ALIAS, USER_REQUESTED_TABLE_UPDATE_PROPERTY
 
Constructor Summary
Release_RDR_Extras(Configuration configuration)
          Create an instance of the Release_RDR_Extras class.
 
Method Summary
 Vector<String> Column_Names()
          This method returns the column names to be displayed in the JTable of the HiVolume GUI, this method needs to be implemented by the subclass.
 Vector<Vector<String>> Find_Products(String observation_id, int minimum_orbit, int maximum_orbit, boolean retrieve_released)
          This method should create a list of released and unreleased products that are available.
 Vector<Vector<String>> Link_Map(Product product)
          A Vector of Vector Strings containing one or more mappings of symbolic links.
static void main(String[] arguments)
          Release RDR Extras to the PDS Node.
 Product Product_Data(String product_id, String version, String product_type)
          This method should retrieve information from the database to create a product object that can be used by the release class to proffer and release a data product into the HiRISE PDS volume.
 void Proffer_Products(Vector<Product> products)
          The Proffer_Products method is the primary method used to release products into the HiRISE PDS Volume and update the HiCat database to indicate the product is available to the PDS.
static void Usage()
           
 
Methods inherited from class HiRISE.HiCat.HiVolume.PDS_Release
addPropertyChangeListener, Create_PDS_Volume_Link, Escape_Underscores, Init_Tagger, Search_Status_Hash, Strip_Version_Dir, Update_Status_Tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface HiRISE.HiCat.HiVolume.Releasable
Create_PDS_Volume_Link
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

EXIT_SUCCESS

public static final int EXIT_SUCCESS
See Also:
Constant Field Values

EXIT_INVALID_COMMAND_LINE_SYNTAX

public static final int EXIT_INVALID_COMMAND_LINE_SYNTAX
See Also:
Constant Field Values

EXIT_CONFIGURATION_ERROR

public static final int EXIT_CONFIGURATION_ERROR
See Also:
Constant Field Values

EXIT_DATABASE_ERROR

public static final int EXIT_DATABASE_ERROR
See Also:
Constant Field Values

EXIT_IO_ERROR

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

Release_RDR_Extras

public Release_RDR_Extras(Configuration configuration)
                   throws Database_Exception,
                          Configuration_Exception
Create an instance of the Release_RDR_Extras class. This method initiates a separate database connection specifically for releasing RDR Extras, independent of any other database connections that may be created by other release classes.

Parameters:
configuration - The configuration to use for configuring the database connection as well as the paths for determining where the PDS products are to be released on the local filesystem.
Throws:
Database_Exception - if the database connection could not be created.
Configuration_Exception - if a problem reading the configuration file occurs.
Method Detail

Column_Names

public Vector<String> Column_Names()
Description copied from class: PDS_Release
This method returns the column names to be displayed in the JTable of the HiVolume GUI, this method needs to be implemented by the subclass.

Specified by:
Column_Names in interface Releasable
Specified by:
Column_Names in class PDS_Release
Returns:
A vector of strings that are table column headings to match the output from Find_Products, will return a null vector if Find_Products has not been called first.
See Also:
Releasable

Find_Products

public Vector<Vector<String>> Find_Products(String observation_id,
                                            int minimum_orbit,
                                            int maximum_orbit,
                                            boolean retrieve_released)
                                     throws Database_Exception
Description copied from class: PDS_Release
This method should create a list of released and unreleased products that are available. This list is primarily used by the HiVolume gui to display and allow the selection of products to be released.

Specified by:
Find_Products in interface Releasable
Specified by:
Find_Products in class PDS_Release
Parameters:
observation_id - - A string containing a full or partial observation_id that can be used to search for products to release.
minimum_orbit - - An integer holding the minimum orbit to search for products
maximum_orbit - - An integer holding the maximum orbit to search for products
retrieve_released - - a boolean value indicating weather or not released products should also be returned (the default should be false).
Returns:
- A Vector of Vectors holding the data for available products.
Throws:
Database_Exception - if the find procedure fails.
See Also:
Releasable.Column_Names()

Product_Data

public Product Product_Data(String product_id,
                            String version,
                            String product_type)
                     throws Database_Exception
Description copied from class: PDS_Release
This method should retrieve information from the database to create a product object that can be used by the release class to proffer and release a data product into the HiRISE PDS volume.

Specified by:
Product_Data in interface Releasable
Specified by:
Product_Data in class PDS_Release
Parameters:
product_id - - A string form of the PRODUCT_ID to gather information for
version - - The version of the product
product_type - - This value should be EDR, RDR, or one of the PRODUCT_TYPE string from the Anaglyph_File_Types or Extras_File_Types tables.
Returns:
A Product object
Throws:
Database_Exception - if a query or database access problem occurs

Proffer_Products

public void Proffer_Products(Vector<Product> products)
                      throws Database_Exception,
                             IOException,
                             InterruptedException
Description copied from class: PDS_Release
The Proffer_Products method is the primary method used to release products into the HiRISE PDS Volume and update the HiCat database to indicate the product is available to the PDS.

Specified by:
Proffer_Products in interface Releasable
Specified by:
Proffer_Products in class PDS_Release
Parameters:
products - - A Vector of Products to be proffered within the HiCat database and linked into the HiRISE PDS Volume.
Throws:
Database_Exception - if the proffering procedure fails on the database.
IOException - if a problem occurs while creating the symbolic link in the PDS Volume
InterruptedException - if the symbolic link procedure (a system call) fails

Link_Map

public Vector<Vector<String>> Link_Map(Product product)
Description copied from class: PDS_Release
A Vector of Vector Strings containing one or more mappings of symbolic links.

Specified by:
Link_Map in interface Releasable
Specified by:
Link_Map in class PDS_Release
Parameters:
product - - the product to generate source and destination paths for
Returns:
a two element vector containing the source and destination paths
See Also:
Releasable.Create_PDS_Volume_Link(Vector)

main

public static void main(String[] arguments)
Release RDR Extras to the PDS Node. Use of this command line interface is not recommended except for testing purposes. The HiVolume application should be used for releasing products in the production environment.

Parameters:
arguments -
See Also:
HiVolume

Usage

public static void Usage()

HiRISE

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