public class Observation extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<Observation>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CRUISE_PATH_PREFIX
Format for pathname of cruise phase Observation
|
static java.util.regex.Pattern |
hexPattern
Pattern to match Observation ID's in hexified strings
|
static java.lang.String |
ID
CVS ID
|
static java.util.regex.Pattern |
idPattern
Pattern to match Observation ID's in strings
|
protected static java.lang.String |
ORBIT_PATH_PREFIX
Format for pathname of in-orbit Observation
|
protected static java.lang.String |
PRELAUNCH_PATH_PREFIX
Format for pathname of pre-launch Observations
|
Constructor and Description |
---|
Observation(int id)
Construct a new Observation with an Integer id.
|
Observation(java.lang.String id)
Construct a new Observation with the given ID String.
|
Modifier and Type | Method and Description |
---|---|
void |
addChannel(Channel channel)
Add a Channel to this Observation.
|
java.lang.Object |
clone()
Clone this Observation
|
int |
compareTo(Observation observation) |
boolean |
equals(java.lang.Object object)
Compare this Observation to another for equality.
|
java.util.Set<java.lang.String> |
getCCDs()
Return the CCD names in this observation.
|
java.util.Set<java.lang.String> |
getCCDs(java.lang.String filter)
Return the CCDs for a given filter name in this observation.
|
java.util.Set<Channel> |
getChannels()
Get the Channels that have been added to this Observation.
|
java.util.Set<Channel> |
getChannels(java.lang.String ccd)
Get the channel names within a given CCD for this observation.
|
java.util.Set<java.lang.String> |
getFilters()
Return the filter names in this observation.
|
java.lang.String |
getHexID()
Get the Hex form of this Observation's ID.
|
java.lang.String |
getID()
Return the Observation ID (non-hex)
|
java.lang.String |
getPath()
Get the relative pathname for this Observation as it will appear in a
HiRISE archive volume.
|
static java.lang.String |
getPhase(int orbit)
Find an appropriate phase for a given orbit number.
|
int |
hashCode()
Get a hashcode for this Observation
|
static boolean |
isValid(java.lang.String test)
Quick low-overhead non-strict validation method.
|
static void |
main(java.lang.String[] args)
This command-line interface parses each argument into an observation.
|
static Observation |
parse(java.lang.String text)
Parse a String for an Observation ID value, returning it as a new
Observation instance.
|
void |
setDescription(java.lang.String description)
Set the description.
|
void |
setTargetName(java.lang.String targetName)
Set the target name.
|
java.lang.String |
toString()
Get the String representation of this Observation, including
target and description if they have been set.
|
public static final java.lang.String ID
protected static final java.lang.String ORBIT_PATH_PREFIX
protected static final java.lang.String CRUISE_PATH_PREFIX
protected static final java.lang.String PRELAUNCH_PATH_PREFIX
public static final java.util.regex.Pattern idPattern
public static final java.util.regex.Pattern hexPattern
public Observation(java.lang.String id) throws Invalid_Argument_Exception
id
- String in the Observation_ID text formInvalid_Argument_Exception
- Bad Observation ID stringpublic Observation(int id) throws Invalid_Argument_Exception
id
- See HiRISE.libHiRISE.Observation_IDInvalid_Argument_Exception
- Bad Observation ID valuepublic void setTargetName(java.lang.String targetName)
targetName
- E.g. MARS, SKY, CALpublic void setDescription(java.lang.String description)
description
- Short description, should be < 75 characters.public java.lang.String toString()
toString
in class java.lang.Object
public static Observation parse(java.lang.String text) throws Invalid_Argument_Exception
text
- String containing an Observation IDInvalid_Argument_Exception
- ID not foundpublic static final java.lang.String getPhase(int orbit)
orbit
- The orbit numberpublic static boolean isValid(java.lang.String test)
test
- The supposed IDpublic java.lang.String getHexID()
public java.lang.String getID()
public java.lang.String getPath()
public void addChannel(Channel channel)
channel
- Channel instancepublic java.util.Set<Channel> getChannels()
public final java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Observation observation)
compareTo
in interface java.lang.Comparable<Observation>
Comparable
public java.util.Set<java.lang.String> getCCDs()
public java.util.Set<java.lang.String> getFilters()
public java.util.Set<java.lang.String> getCCDs(java.lang.String filter)
filter
- Name of filter (RED, BG, IR)public java.util.Set<Channel> getChannels(java.lang.String ccd)
ccd
- CCD Name, e.g. RED0_0public static void main(java.lang.String[] args)
args
- Series of strings containing observationsCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona