public class Observation_Event extends java.lang.Object implements java.lang.Comparable<Observation_Event>
Observation_ID
, but it is not required to be so. The start
time and the duration are assumed to be in units of seconds.
The observation event implements the Comparable
interface for
sorting. The natural sort order of an event is its start time, not its
identifier as one might expect. In practice, the start time of most HiRISE
observations will be tightly coupled to their Observation_ID
s, but this situation applies only to
observations of the surface of Mars from Mars orbit, when the ID includes an
orbit number and an orbit phase.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Constructor and Description |
---|
Observation_Event(Observation_Record observation)
Creates a new event from an observation record.
|
Observation_Event(java.lang.String identifier,
java.util.Date predictTime,
double startTime,
double duration)
Creates a new event from a unique identifier, predict time, start time,
and duration.
|
Observation_Event(java.lang.String identifier,
double startTime,
double duration)
Creates a new event from a unique identifier, start time, and duration.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Observation_Event compEvent)
Compares this observation event to the specified observation event for
order.
|
Category |
getCategory() |
double |
getDuration()
Gets the duration.
|
java.lang.String |
getIdentifier()
Gets the unique identifier.
|
java.util.Date |
getPredictTime()
Gets the predict time.
|
double |
getStartTime()
Gets the start time.
|
boolean |
isArbitrary()
Indicates whether this observation is a so-called arbitrary observation.
|
void |
setArbitrary(boolean isArbitrary)
Sets whether this observation is a so-called arbitrary observation.
|
void |
setCategory(Category category) |
void |
setDuration(double duration)
Sets the duration.
|
void |
setIdentifier(java.lang.String identifier)
Sets the unique identifier.
|
void |
setPredictTime(java.util.Date predictTime)
Sets the predict time.
|
void |
setStartTime(double startTime)
Sets the start time.
|
java.lang.String |
toString()
Gets a brief description of this observation event.
|
public static final java.lang.String ID
public Observation_Event(Observation_Record observation) throws Invalid_Argument_Exception
observation ID
, predict time
, observation duration
, and setup duration
. If any of these is
null, an Invalid_Argument_Exception
is thrown.observation
- the observation record.Invalid_Argument_Exception
- if the observation lacks the information
neeeded to construct an event.public Observation_Event(java.lang.String identifier, java.util.Date predictTime, double startTime, double duration)
identifier
- the unique identifier for this event.predictTime
- the predict time for this event.startTime
- the start time of this event, in seconds.duration
- the duration of this event, in seconds.public Observation_Event(java.lang.String identifier, double startTime, double duration)
identifier
- the unique identifier for this event.startTime
- the start time of this event.duration
- the duration of this event.public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String identifier)
identifier
- the observation event's unique identifier.public java.util.Date getPredictTime()
Observation_Record.delay_by()
time can
offset this slightly, and the actual start time of the observation is found
by the startTime
method.public void setPredictTime(java.util.Date predictTime)
Observation_Record.delay_by()
time can
offset this slightly, and the actual start time of the observation is found
by the startTime
method.predictTime
- the new predict time.public double getStartTime()
public void setStartTime(double startTime)
startTime
- the observation event's start time.public double getDuration()
public void setDuration(double duration)
duration
- the observation event's duration.public boolean isArbitrary()
public void setArbitrary(boolean isArbitrary)
isArbitrary
- true if the observation is arbitrary;
false otherwise.public Category getCategory()
public void setCategory(Category category)
public int compareTo(Observation_Event compEvent)
compareTo
in interface java.lang.Comparable<Observation_Event>
compEvent
- the observation event to compare to this observation
event.public java.lang.String toString()
toString
in class java.lang.Object
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona