HiRISE

HiRISE.HiPlan.Shapes
Class CTX_Products

java.lang.Object
  extended by HiRISE.HiPlan.Shapes.CTX_Products
All Implemented Interfaces:
edu.asu.jmars.layer.util.features.FeatureProvider, Observation_Fields

public class CTX_Products
extends Object
implements edu.asu.jmars.layer.util.features.FeatureProvider, Observation_Fields

A simple feature provider for CTX image products as cataloged in HiCat. As a FeatureProvider, this class can provide features to the JMARS shape layer.

Database configuration information is taken from the user's environment via the Constants.CONFIGURATION_PROPERTY system property, which names a file to be used. If there is a problem with the configuration or with the database connection, provider reports this fact to the operator.

Coordinates: The CTX dataset is planetocentric, east-leading. The shape layer takes planetocentric, west-leading data, so the longitude data are converted to west-leading.

Version:
1.25
Author:
Christian Schaller - UA/PIRL

Field Summary
static String DATABASE_FACTORY_ID
          The name of the optional configuration parameter to hold a unique ID for the CTX products feature provider's database object.
static String DEFAULT_DATABASE_FACTORY_ID
          The default database factory ID for the CTX products feature provider.
static String ID
          Class identification name with source code version and date.
static String SERVICE_DESCRIPTION
           
 
Fields inherited from interface HiRISE.HiPlan.HiCat.Observation_Fields
ALTITUDE, ANCILLARY_DATA, ASCENDING_PASS, CALIBRATION, CENTER_PLANETOCENTRIC_LATITUDE, CENTER_PLANETOGRAPHIC_LATITUDE, COMMAND_FILE_ASP_RECEIPT_TIME, COMMAND_FILE_DOM_RECEIPT_TIME, COMMAND_FILE_GENERATION_TIME, COMMAND_FILE_MRO_UPLINK_TIME, COMMAND_FILE_PATHNAME, COMMANDER, COMMENT, COMPLETE, CONTRAST_RATIO, COORDINATED_TRACK_HISTORY, COORDINATION, CPMM_00_ON, CPMM_01_ON, CPMM_02_ON, CPMM_03_ON, CPMM_04_ON, CPMM_05_ON, CPMM_06_ON, CPMM_07_ON, CPMM_08_ON, CPMM_09_ON, CPMM_10_ON, CPMM_11_ON, CPMM_12_ON, CPMM_13_ON, CPMM_POWER_FIELDS, CRC_CHECK, CRISM_COORDINATION, CTX_COORDINATION, DEFAULT_FELICS_COMPRESSION_RATIO, DEFUNCT, DEIMOS, DELAY_BY, DESCENDING_PASS, DUST, END_PLANETOCENTRIC_LATITUDE, END_PLANETOGRAPHIC_LATITUDE, ESTIMATED_EMISSION_ANGLE, ESTIMATED_INCIDENCE_ANGLE, ESTIMATED_PHASE_ANGLE, ESTIMATED_RECEIVE_TIME, ESTIMATED_ROLL_ANGLE, EXECUTED, FELICS_COMPRESSION_FLAG, FELICS_COMPRESSION_RATIO, FOOTPRINT_PLANETOCENTRIC_VERTICES, FOOTPRINT_PLANETOGRAPHIC_VERTICES, FROST_ALBEDO, FROST_COVER, HELIOCENTRIC_DISTANCE, HIGH_STABILITY, HIGH_STABILITY_LARGE_ROLL, HIGH_STABILITY_NADIR, HIGH_STABILITY_SMALL_ROLL, HISTORY, ICE, IMAGE_WIDTH, INCOMPLETE, INSTRUMENT_SET, KA_BAND_PLAYBACK, KEEP_STIM_LAMPS_ON_FLAG, KEY_ID, LAST_UPDATE, LSUBS, LUNA, LUT_SELECTOR_BG_FUDGE_FACTOR, LUT_SELECTOR_IR_FUDGE_FACTOR, LUT_SELECTOR_RED_FUDGE_FACTOR, MANUAL_DELAY_BY_FLAG, MARS, MINIMUM_SETUP_DURATIONS, MOON, NO, NOOP, NOPROC, NORMAL_STABILITY, NORMAL_STABILITY_LARGE_ROLL, NORMAL_STABILITY_NADIR, NORMAL_STABILITY_SMALL_ROLL, NOTES, OBSERVATION_DURATION, OBSERVATION_ID, OBSERVATION_TYPE, OFF, OFFSET_CENTER_ALTITUDE, OFFSET_CENTER_LONGITUDE, OFFSET_CENTER_PLANETOCENTRIC_LATITUDE, OFFSET_CENTER_PLANETOGRAPHIC_LATITUDE, ON, OPTICAL_DEPTH, ORBIT_ALTERNATIVES, ORBIT_PASS, OTHER_COORDINATION, PHOBOS, PI_APPROVAL_TO_RELEASE_FLAG, PLANNED, PLANNED_OBSERVATIONS_TABLE, PLANNER, PLAYBACK_MODE, PREDICT_TIME, RAW_DATA_VOLUME_BYTES, RELATIONAL_DATA, RELATIVE_TIMED_SEQUENCE_FLAG, REQUEST_CATEGORY, REQUEST_PRIORITY, REQUESTED, SCAN_EXPOSURE_DURATION, SCATTERING_SOURCE, SCATTERING_SOURCES, SCMF, SEQUENCE_ID, SETUP_DURATION, SKY, SPARE_3, STABILITY, STARS, START_PLANETOCENTRIC_LATITUDE, START_PLANETOGRAPHIC_LATITUDE, STATUS, STATUSES, STIMULATION_LAMP_BLG_ON, STIMULATION_LAMP_NIR_ON, STIMULATION_LAMP_POWER_FIELDS, STIMULATION_LAMP_RED_ON, SUCCESS_ACQUIRED_TIME, SURFACE_ROUGHNESS, SURFACE_TYPE, TARGET_NAMES, X_BAND_PLAYBACK, YES
 
Constructor Summary
CTX_Products()
          Creates a new feature provider for CTX products.
 
Method Summary
 String getDescription()
          Gets a description of this feature provider.
 File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String baseName)
          Gets the names of the files output by a save with the given base name and feature collection.
 String getExtension()
          Gets the file extension.
 boolean isFileBased()
          Tests whether this provider pulls data from a file.
 boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
          Tests whether the given can be completely represented in the source format of this provider.
 edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
          Gets a new feature collection containing data from the provider's database.
 int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String filename)
          Writes the specified features to source the feature provider was constructed from.
 
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 identification name with source code version and date.

See Also:
Constant Field Values

SERVICE_DESCRIPTION

public static final String SERVICE_DESCRIPTION
See Also:
Constant Field Values

DATABASE_FACTORY_ID

public static final String DATABASE_FACTORY_ID
The name of the optional configuration parameter to hold a unique ID for the CTX products feature provider's database object. The parameter is expected to be found in the Constants.APPLICATION_GROUP (Shapes).

The ID is used in the DatabaseFactory.getInstance(Configuration,String) method. If this parameter is not specified, DEFAULT_DATABASE_FACTORY_ID will be used; each of the shape layer feature providers that uses the database uses its own such ID, resulting in each provider using its own connection. The parameters can be tweaked in the user's configuration should sharing a connection be desired.

Parameter name: CTX_Products_DBF_ID.

See Also:
Constant Field Values

DEFAULT_DATABASE_FACTORY_ID

public static final String DEFAULT_DATABASE_FACTORY_ID
The default database factory ID for the CTX products feature provider.

Value: Shapes.CTX_Products.

See Also:
DATABASE_FACTORY_ID, Constant Field Values
Constructor Detail

CTX_Products

public CTX_Products()
Creates a new feature provider for CTX products.

Method Detail

getDescription

public String getDescription()
Gets a description of this feature provider. This value appears in the Shape layer's menu.

Specified by:
getDescription in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
"CTX Products"

getExistingSaveToFiles

public File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                                     String baseName)
Gets the names of the files output by a save with the given base name and feature collection.

Specified by:
getExistingSaveToFiles in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the feature collection in question.
baseName - the base name in question.
Returns:
the names of the output files.

getExtension

public String getExtension()
Gets the file extension. Since this provider pulls data from a database rather than from a file, there is no file extension.

Specified by:
getExtension in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
null.

isFileBased

public boolean isFileBased()
Tests whether this provider pulls data from a file. This provider does not.

Specified by:
isFileBased in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
false.

isRepresentable

public boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
Tests whether the given can be completely represented in the source format of this provider.

Specified by:
isRepresentable in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection to be tested.
Returns:
false.

load

public edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
Gets a new feature collection containing data from the provider's database. No dialog is presented to the operator; a default SQL query is used. If there was a problem with the configuration or with the database connection during construction of this provider, this method returns an empty collection.

Specified by:
load in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
filename - unused, but required by the interface.
Returns:
a new single feature collection, which may be empty.

save

public int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                String filename)
Writes the specified features to source the feature provider was constructed from. This method is unsupported, so an UnsupportedOperationException is thrown if this method is called.

Specified by:
save in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection of features in question.
filename - a filename.
Returns:
the number of features saved.

HiRISE

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