public class CCD_ID extends Observation_ID
Formally, a CCD ID consists of the text representation of a
HiRISE observation ID followed by an underscore mark ("_") and a
four-character code identifying the CCD. This code, the CCD
name, is defined in Instrument.CCD_NAMES
[] and must match one
of those 14 names. The names are indexed according to their CPMM
(CCD Processing and Memory Module) number.
Observation_ID
,
Instrument
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CPMM_NUMBER |
static java.lang.String |
ID
Class identification name with source code version and date.
|
AEROBRAKING, APPROACH, ATLO, CALIBRATION, CPMM_AND_CHANNEL_PATTERN, CRUISE, DEFAULT_INORBIT_PHASE, DEFAULT_MISSION_PHASE, DEFAULT_OBSERVATION_ID, DEFAULT_ORBIT_NUMBER, DEFAULT_PREORBIT_PHASE, DEFAULT_TARGET, DEFAULT_TIME, DEFAULT_TIME_TEXT_FORMAT, DELIMITER_PATTERN, EPOCH, EXTENDED_SCIENCE_PHASE, EXTENSION_DELIMITER, EXTENSION_PATTERN, GAP_INDICATOR_PATTERN, INORBIT_MISSION_PHASE_GROUP, INORBIT_ORBIT_NUMBER_GROUP, INORBIT_PREFIX_GROUP, INORBIT_SUFFIX_GROUP, INORBIT_TARGET_GROUP, INSTRUMENT_ID_PATTERN, INTEGRATION_AND_TESTING, INVALID_OBSERVATION_ID, JPL_TIME_TEXT_FORMAT, KENNEDY_SPACE_CENTER, LAST_PREORBIT_PHASE, LAUNCH, MISSION_PHASE_ABBREVIATION, MISSION_PHASE_BIT_COUNT, MISSION_PHASE_MASK, MISSION_PHASE_MAX, MISSION_PHASE_MAX_ORBIT, MISSION_PHASE_MAX_TIME, MISSION_PHASE_NAME, MISSION_PHASE_PATTERN, MISSION_PHASE_START, OBSERVATION_ID_PATTERN, OPTIONAL_DELIMITER_PATTERN, ORBIT_NUMBER_BIT_COUNT, ORBIT_NUMBER_MASK, ORBIT_NUMBER_MAX, ORBIT_NUMBER_MIN, ORBIT_NUMBER_PATTERN, ORBIT_NUMBER_START, PDS_TIME_TEXT_FORMAT, PREFIX_PATTERN, PREORBIT_MISSION_PHASE_GROUP, PREORBIT_PREFIX_GROUP, PREORBIT_SUFFIX_GROUP, PREORBIT_TIME_GROUP, PRIMARY_SCIENCE_PHASE, RELAY, REQUIRED_DELIMITER_PATTERN, RESERVED_1, RESERVED_10, RESERVED_11, RESERVED_12, RESERVED_13, RESERVED_14, RESERVED_15, RESERVED_16, RESERVED_17, RESERVED_18, RESERVED_19, RESERVED_2, RESERVED_3, RESERVED_4, RESERVED_5, RESERVED_6, RESERVED_7, RESERVED_8, RESERVED_9, RSDS_OPS_CPMM_AND_CHANNEL_GROUP, RSDS_OPS_EXTENSION_GROUP, RSDS_OPS_GAP_GROUP, RSDS_OPS_INSTRUMENT_ID_GROUP, RSDS_OPS_OBSERVATION_ID_GROUP, RSDS_OPS_SPACECRAFT_ID_GROUP, RSDS_OPS_VERSION_GROUP, RSDS_TEST_CPMM_AND_CHANNEL_GROUP, RSDS_TEST_EXTENSION_GROUP, RSDS_TEST_GAP_GROUP, RSDS_TEST_ID_GROUP, RSDS_TEST_INSTRUMENT_ID_GROUP, RSDS_TEST_OBSERVATION_ID_GROUP, RSDS_TEST_SPACECRAFT_ID_GROUP, RSDS_TEST_VERSION_GROUP, RSDS_TIME_TEXT_FORMAT, SPACECRAFT_ID_PATTERN, SUFFIX_PATTERN, SVT, TARGET_BIT_COUNT, TARGET_MASK, TARGET_MAX, TARGET_PATTERN, TARGET_START, TEST_ID_PATTERN, TEXT_DELIMITER, TIME_BIT_COUNT, TIME_MASK, TIME_MAX, TIME_PATTERN, TIME_START, TOTAL_MISSION_PHASES, TRANSITION, VERSION_PATTERN
Constructor and Description |
---|
CCD_ID()
Creates a default
CCD_ID with the
Observation_ID.DEFAULT_OBSERVATION_ID and
DEFAULT_CPMM_NUMBER values. |
CCD_ID(int observation_id_value,
int cpmm_value)
Creates a
CCD_ID with the specified
Observation_ID and CPMM number. |
CCD_ID(int mission_phase_value,
int time_value,
int cpmm_value)
Creates a pre-orbit
CCD_ID from the specified pre-orbit
mission phase, pre-orbit time component, and CPMM number. |
CCD_ID(int mission_phase_value,
int orbit_number_value,
int target_value,
int cpmm_value)
Creates an in-orbit
CCD_ID from the specified in-orbit mission
phase, orbit number, target component, and CPMM number. |
CCD_ID(java.lang.String id_text)
Creates a
CCD_ID from a string. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
ccd_name()
Returns the CCD name corresponding to the CPMM number of this
CCD_ID object. |
CCD_ID |
ccd_name(java.lang.String ccd_text)
Sets the CPMM number for this
CCD_ID object based on a text
string. |
CCD_ID |
ccd_name(java.lang.String ccd_text,
boolean use_defaults)
Sets the CPMM number for this
CCD_ID object based on a text
string. |
int |
cpmm_number()
Returns the CPMM number for this
CCD_ID object. |
CCD_ID |
cpmm_number(int cpmm_value)
Sets the CPMM number for this
CCD_ID object. |
CCD_ID |
cpmm_number(java.lang.String cpmm_text)
Sets the CPMM number for this
CCD_ID object based on a text
string. |
CCD_ID |
cpmm_number(java.lang.String cpmm_text,
boolean use_defaults)
Sets the CPMM number for this
CCD_ID object based on a text
string. |
java.lang.String |
parse(java.lang.String the_text)
Sets the value of this
CCD_ID using a text
representation. |
java.lang.String |
parse(java.lang.String the_text,
boolean use_defaults)
Parses a string to obtain a value for the CPMM number.
|
java.lang.String |
text()
Returns the text representation of the
CCD_ID . |
CCD_ID |
text(java.lang.String the_text)
Sets the value of this
CCD_ID using a text
representation. |
CCD_ID |
text(java.lang.String id_text,
boolean use_defaults)
Sets the value of this
CCD_ID using a
text representation. |
java.lang.String |
toString()
Produces the text representation of this
CCD_ID . |
extract_mission_phase, extract_mission_phase, extract_orbit_number, extract_orbit_number, extract_target, extract_target, extract_time, extract_time, hex_value, hex_value, is_preorbit, mission_phase_from_orbit_number, mission_phase_from_time, mission_phase, mission_phase, mission_phase, mission_phase, orbit_number, orbit_number, orbit_number, orbit_number, target, target, target, target, time_now, time_text_format, time_text_format, time_text, time_text, time, time, time, time, time, time, value, value, value, value, zero_pad_binary, zero_pad_hex, zero_pad_number, zero_pad_number
public static final java.lang.String ID
public static final int DEFAULT_CPMM_NUMBER
public CCD_ID()
CCD_ID
with the
Observation_ID.DEFAULT_OBSERVATION_ID
and
DEFAULT_CPMM_NUMBER
values.public CCD_ID(int observation_id_value, int cpmm_value)
CCD_ID
with the specified
Observation_ID
and CPMM number.
If cpmm_value
is not less than Instrument.CCDS
, or
if it is equal to Instrument.CCD_UNKNOWN
, then
DEFAULT_CPMM_NUMBER
will be used instead.observation_id_value
- The initial numeric value of the
Observation_ID.cpmm_value
- The initial value for the CPMM number.public CCD_ID(int mission_phase_value, int time_value, int cpmm_value)
CCD_ID
from the specified pre-orbit
mission phase, pre-orbit time component, and CPMM number.
If mission_phase_value
is not a pre-orbit mission phase, then
Observation_ID.DEFAULT_PREORBIT_PHASE
will be used. If
time_value
is greater than Observation_ID.TIME_MAX
,
Observation_ID.DEFAULT_TIME
will be used. If time_value is
negative, however, then the current system clock time will be used to set
the pre-orbit time component. Finally, if cpmm_value
is not
less than Instrument.CCDS
, or if it is not equal to
Instrument.CCD_UNKNOWN
, then DEFAULT_CPMM_NUMBER
will
be used instead.mission_phase_value
- The pre-orbit mission phase.time_value
- The value for the pre-orbit time component. If it
is negative, the current system clock time will be used instead.cpmm_value
- The initial value for the CPMM number.public CCD_ID(int mission_phase_value, int orbit_number_value, int target_value, int cpmm_value)
CCD_ID
from the specified in-orbit mission
phase, orbit number, target component, and CPMM number.
If mission_phase_value
is not an in-orbit mission phase, then
Observation_ID.DEFAULT_INORBIT_PHASE
will be used. If
orbit_number_value
is greater than
Observation_ID.ORBIT_NUMBER_MAX
, then
Observation_ID.DEFAULT_ORBIT_NUMBER
will be used. If
target_value
is greater than
Observation_ID.TARGET_MAX
, then
Observation_ID.DEFAULT_TARGET
will be used. Finally, if
cpmm_value
is not less than Instrument.CCDS
, or
if it is not equal to Instrument.CCD_UNKNOWN
, then
DEFAULT_CPMM_NUMBER
will be used instead.mission_phase_value
- The in-orbit mission phase.orbit_number_value
- The value for the orbit number component.target_value
- The value for the target component.cpmm_value
- The initial value for the CPMM number.public CCD_ID(java.lang.String id_text)
CCD_ID
from a string.
If a valid CPMM number cannot be parsed from the string, then
Instrument.CCD_UNKNOWN
will be used. If a valid observation ID
component cannot be parsed from the string,
Observation_ID.INVALID_OBSERVATION_ID
will be used.id_text
- A string that contains a text representation of the
CCD_ID
.text(String)
public int cpmm_number()
CCD_ID
object. A value of
Instrument.CCD_UNKNOWN
indicates the CPMM number is not known
for this CCD_ID.
Note that CPMM number is not the same as CCD number, the latter of which
is also called a "DCA (detector chip array) number." The CPMM number
may be used as an index into the Instrument.CCD_NAMES
array to obtain
the corresponding CCD name for the CPMM number. There is currently no
mechanism in place to map CPMM number to CCD/DCA number, however.CCD_ID
object.public CCD_ID cpmm_number(int cpmm_value) throws Out_of_Range_Exception
CCD_ID
object. If
cpmm_value
is greater than or equal to
Instrument.CCDS
, the CPMM number will be set to
DEFAULT_CPMM_NUMBER
and an Out_of_Range_Exception
will be
thrown, unless it is set to Instrument.CCD_UNKNOWN
, which
indicates that the CPMM number is not known.cpmm_value
- The value for the CPMM number for this
CCD_ID
object.CCD_ID
.Out_of_Range
- If cpmm_value is greater than or equal to
Instrument.CCDS
. The CPMM number will be set to
DEFAULT_CPMM_NUMBER
in this case.Out_of_Range_Exception
public CCD_ID cpmm_number(java.lang.String cpmm_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
CCD_ID
object based on a text
string. The string can contain either the text form of the CPMM number or a
valid CCD name from which the CPMM number can be derived. If a CPMM number
cannot be derived from the string, the CPMM number will be set to
Instrument.CCD_UNKNOWN
and an Invalid_Argument_Exception
will be thrown. If a value greater than or equal to
Instrument.CCDS
is derived, the CPMM number will be set to
DEFAULT_CPMM_NUMBER
and an Out_of_Range_Exception
will be
thrown. If use_defaults
is true
the
DEFAULT_CPMM_NUMBER
will be used instead.cpmm_text
- The text representation of the CPMM number or the
corresponding CCD name.use_defaults
- If true
, DEFAULT_CPMM_NUMBER
will be used if the CPMM number cannot be parsed
or if the parsed value is out of range; otherwise,
an Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.CCD_ID
.Invalid_Argument_Exception
- If cpmm_text cannot be parsed for a
valid CPMM number. The CPMM number will be set to
Instrument.CCD_UNKNOWN
in this case.Out_of_Range_Exception
- If cpmm_text indicates a value greater than
or equal to Instrument.CCDS
. The CPMM number will be set to
DEFAULT_CPMM_NUMBER
in this case.public CCD_ID cpmm_number(java.lang.String cpmm_text)
CCD_ID
object based on a text
string. The string can contain either the text form of the CPMM number or a
valid CCD name from which the CPMM number can be derived. If a CPMM number
cannot be derived from the string, or if a value greater than or equal to
Instrument.CCDS
is derived, the CPMM number will be set to
DEFAULT_CPMM_NUMBER
. This method calls
cpmm_number(String,boolean)
with use_defaults
set to
true
.cpmm_text
- The text representation of the CPMM number or the
corresponding CCD name.CCD_ID
.public java.lang.String ccd_name()
CCD_ID
object. If the CPMM number is unknown
then Instrument.CCD_UNKNOWN
is returned instead, as a string.CCD_ID
or Instrument.CCD_UNKNOWN.public CCD_ID ccd_name(java.lang.String ccd_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
CCD_ID
object based on a text
string. This method simply calls cpmm_number(String,boolean).ccd_text
- The text representation of the CPMM number or the
corresponding CCD name.use_defaults
- If true
, DEFAULT_CPMM_NUMBER
will be used if the CPMM number cannot be parsed
or if the parsed value is out of range; otherwise,
an Invalid_Argument_Exception
or
Out_of_Range_Exception
will be thrown.CCD_ID
.Invalid_Argument_Exception
- If cpmm_text cannot be parsed for a
valid CPMM number. The CPMM number will be set to
Instrument.CCD_UNKNOWN
in this case.Out_of_Range_Exception
- If cpmm_text indicates a value greater than
or equal to Instrument.CCDS
. The CPMM number will be set to
DEFAULT_CPMM_NUMBER in this case.cpmm_number(String,boolean)
public CCD_ID ccd_name(java.lang.String ccd_text)
CCD_ID
object based on a text
string. This method calls ccd_name(String,boolean)
with
use_defaults
set to true
.ccd_text
- The text representation of the CPMM number or the
corresponding CCD name.CCD_ID
.ccd_name(String,boolean)
public java.lang.String text()
CCD_ID
. The text
representation consists of the text representation of its observation ID
followed by the CCD name that corresponds to its CPMM number. If the CPMM
number is unknown Instrument
CCD_UNKNOWN}, then
Instrument.CCD_UNKNOWN
replaces the CCD name in the text
representation. Regardless, the CCD name and the observation ID text are
separated by an underscore ("_") delimiter.text
in class Observation_ID
CCD_ID
.public CCD_ID text(java.lang.String id_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
CCD_ID
using a
text representation. If the id_text
cannot be parsed for a valid
CCD ID, an Invalid_Argument_Exception
is thrown. If
use_defaults
is true
, appropriate default values
will be used as needed instead.text
in class Observation_ID
id_text
- The text to be parsed to obtain the value.use_defaults
- If true
, default values for the
various components of a CCD_ID
will be used
when they cannot be determined from the id_text
. If
false
, an Invalid_Argument_Exception
will be
thrown instead.CCD_ID
.Invalid_Argument_Exception
- If a CCD ID cannot be parsed
from the_text
and use_defaults
is
false
.Out_of_Range_Exception
- If a one of the parsed values is out of
range and use_defaults
is false
.parse(String)
public CCD_ID text(java.lang.String the_text)
CCD_ID
using a text
representation. If the_text
cannot be parsed for a valid
CCD ID, appropriate default values will be used as needed instead.
This method calls parse(String,boolean)
with
use_defaults
set to true
.text
in class Observation_ID
the_text
- The text from which to parse a CCD ID.CCD_ID
.parse(String,boolean)
public java.lang.String parse(java.lang.String the_text, boolean use_defaults) throws Invalid_Argument_Exception, Out_of_Range_Exception
parse
in class Observation_ID
the_text
- The text to be parsed.use_defaults
- If true
, default values for the
various components of a CCD_ID
will be used
when they cannot be determined from the_text
. If
false
, an Invalid_Argument_Exception
will be
thrown instead.Invalid_Argument_Exception
- If a CCD ID cannot be parsed
from the_text
and use_defaults
is
false
.Out_of_Range_Exception
- If a one of the parsed values is out of
range and use_defaults
is false
.cpmm_number()
public java.lang.String parse(java.lang.String the_text)
CCD_ID
using a text
representation. If the_text
cannot be parsed for a valid
observation ID, appropriate default values will be used as needed instead.
This method calls parse(String,boolean)
with
use_defaults
set to true
.
This method returns the text that was not used in the interpretation of an
observation ID. Subclasses of Observation_ID
can use this
returned text to parse additional information.
parse
in class Observation_ID
the_text
- The text from which to parse an observation ID.text(String, boolean)
public java.lang.String toString()
CCD_ID
.toString
in class Observation_ID
CCD_ID
.text()
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona