HiRISE

HiRISE.HiCat.Utilities
Class Suggestion

java.lang.Object
  extended by HiRISE.HiCat.Utilities.Suggestion

public class Suggestion
extends Object

A very simple class for holding data about a suggestion. This is primarily needed for holding suggestion data when unretiring a suggestion.

Version:
1.16 2012/06/21 22:39:20
Author:
Rodney Heyd UA/PIRL

Field Summary
static String ID
          The class identification
static String STL_COMMENT_END_FLAG
           
static String STL_COMMENT_START_FLAG
           
 
Constructor Summary
Suggestion()
          Create a new suggestion with default values.
Suggestion(int id, String retiring_observation_id, String date_success)
           
 
Method Summary
 double Center_Latitude()
          Get the Center_Latitude of the suggestion.
 void Center_Latitude(double latitude)
          Set the center latitude of the suggestion
 double Center_Longitude()
          Get the center longitude of the suggestion
 void Center_Longitude(double longitude)
          Set the center longitude of the suggestion
 String Child_Observation_ID()
          Gets the Child Observation ID of this suggestion if it exists.
 void Child_Observation_ID(String child_observation_id)
          Sets the Child Observation ID String for this suggestion.
 int Child_Planned_Observations_ID()
          Get the integer database id of the Child Observation.
 void Child_Planned_Observations_ID(int planned_observation_id)
          Sets the integer database id of the Child Observation, defaults to -1.
 boolean Classroom_Relation_Created()
          Indicates if the Classroom relationship to the cloned suggestion was properly recreated after the clone was created.
 void Classroom_Relation_Created(boolean classroom_relation_created)
          Sets the success status of creating the classroom relation for the cloned suggestion.
 int Clone_ID()
          Gets the clone suggestion id.
 void Clone_ID(int clone_id)
          Sets the suggestion id of the clone if needed.
 String Date_Success()
          Gets the success date of this suggestion.
 void Date_Success(String date_success)
          Sets the retirement date for this suggestion.
 String First_Half_Observation_ID()
          If this suggestion is part of a stereo pair, and is mapped to a planned observation this field will return the Observation ID of the first half suggestion is mapped to..
 void First_Half_Observation_ID(String first_half_observation_id)
          If the suggestion is part of a stereo pair, this method will set the value of the Observation ID that the first suggestion of the pair is mapped to (if it has been mapped at all).
 int First_Half_Stereo_Planned_Observations_ID()
          Gets the Planned_Observations.ID of the first half stereo suggestion id if this suggestion is part of stereo pair and has been mapped to a planned observation.
 void First_Half_Stereo_Planned_Observations_ID(int first_Half_Stereo_Planned_Observations_ID)
          Sets the Planned_Observations.ID for the first half stereo suggestion if the stereo suggestion has been mapped to a planned observation.
 int First_Half_Stereo_Suggestion_ID()
          Gets the suggestion id of the first suggestion in the stereo pair.
 void First_Half_Stereo_Suggestion_ID(int first_half_stereo_suggestion_id)
          Sets the suggestion id of the first suggestion in the stereo pair if this suggestion is part of a stereo pair.
 boolean First_Half_Stereo()
          Is this suggestion a first half stereo suggestion?
 Calendar getAcquiredDate()
           
 String getScienceRationale()
          Get the science rationale for the suggestion.
 String getSTLDescription()
          Get the STL Description for the suggestion
 Calendar getSuggestion_Date()
           
 int ID()
          Return the Suggestion ID of this Suggestion object
 void ID(int id)
          Sets the suggestion id of this object.
 boolean Is_Mapped()
          If the suggestion is a parent of an Observation, then the suggestion will be mapped to the Child Observation.
 boolean isStereo()
           
 void isStereo(boolean status)
           
 boolean isSuggestionDateAfterAcquired()
           
 boolean People_Relation_Created()
          Indicates if the relationship of the cloned suggestion to the people table was properly recreated.
 void People_Relation_Created(boolean people_relation_created)
          Sets the success status of the creation of the relation of the cloned suggestion to the people table.
 String Retiring_Observation_ID()
          Gets the observation id which retired this suggestion.
 void Retiring_Observation_ID(String retiring_observation_id)
          Sets the retiring observation id for the suggestion.
 String ROI_String()
          Get the Region of Interest string as formatted in the database
 void ROI_String(String roi)
          Set the Region of Interest string, this should be formatted as in HiCat
 boolean Science_Themes_Created()
          Gets the success status of the creation of the science themes relationship for the cloned suggestion.
 void Science_Themes_Created(boolean science_themes_created)
          Sets the success status of the creation of the science themes relations for the cloned suggestion.
 String Second_Half_Stereo_Observation_ID()
          Returns the observation id of the second half stereo observation if the second half suggestion has been mapped to an observation.
 void Second_Half_Stereo_Observation_ID(String second_half_stereo_observation_id)
          Sets the second half stereo observation id for this suggestion if it is part of a stereo pair and the second half observation has been planned.
 int Second_Half_Stereo_Planned_Observations_ID()
          Gets the Planned_Observations.ID of the second half stereo observation if it exists.
 void Second_Half_Stereo_Planned_Observations_ID(int second_half_stereo_planned_observations_id)
          Sets the Planned_Observations.ID of the second half stereo suggestion, if it exists.
 int Second_Half_Stereo_Suggestion_ID()
          Gets the second half stereo suggestion id if it exists.
 void Second_Half_Stereo_Suggestion_ID(int second_half_stereo_suggestion_id)
          Sets the second half stereo suggestion id for the suggestion if it is part of a stereo pair.
 boolean Second_Half_Stereo()
          Is the suggestion a second half stereo suggestion?
 void Second_Half_Stereo(boolean second_half_stereo)
          Sets the Second Half Stereo flag, for the object.
 void setAcquiredDate(String datestring)
           
 void setScienceRationale(String rationale)
          Set the science rationale for the suggestion.
 void setSTLDescription(String description)
          Set the STL Description for the suggestion
 void setSuggestionDate(String datestring)
           
 String Special_Notes()
          Get the Special_Notes field for this suggestion.
 void Special_Notes(String special_notes)
          Set the Special_Notes field for this suggestion.
 boolean Suggestion_Cloned()
          This records whether or not a suggestion needed to be cloned before it was unretired.
 void Suggestion_Cloned(boolean suggestion_cloned)
          Sets the cloned status of the suggestion.
 String Unretirement_Message()
          Get the unretirement message.
 void Unretirement_Message(String unretirement_message)
          Set the unretirement message for this suggestion.
 boolean Unretirement_Request_Flag()
           
 void Unretirement_Request_Flag(boolean flag)
           
 boolean Unretirement_Successfull()
           
 void Unretirement_Successfull(boolean success_status)
           
 
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
The class identification

See Also:
Constant Field Values

STL_COMMENT_START_FLAG

public static final String STL_COMMENT_START_FLAG
See Also:
Constant Field Values

STL_COMMENT_END_FLAG

public static final String STL_COMMENT_END_FLAG
See Also:
Constant Field Values
Constructor Detail

Suggestion

public Suggestion(int id,
                  String retiring_observation_id,
                  String date_success)

Suggestion

public Suggestion()
Create a new suggestion with default values.

Method Detail

ID

public int ID()
Return the Suggestion ID of this Suggestion object

Returns:
the integer value of the suggestion id

ID

public void ID(int id)
Sets the suggestion id of this object. Default is -1.

Parameters:
id -

Center_Latitude

public double Center_Latitude()
Get the Center_Latitude of the suggestion.

Returns:
the center latitude of the suggestion, -999.999 if the latitude has not been set.

Center_Latitude

public void Center_Latitude(double latitude)
Set the center latitude of the suggestion

Parameters:
latitude - - the center latitude of the suggestion

Center_Longitude

public double Center_Longitude()
Get the center longitude of the suggestion

Returns:
- a double representing the center longitude of the suggestion

Center_Longitude

public void Center_Longitude(double longitude)
Set the center longitude of the suggestion

Parameters:
longitude - - a double value

ROI_String

public String ROI_String()
Get the Region of Interest string as formatted in the database

Returns:
- the region of interest string

ROI_String

public void ROI_String(String roi)
Set the Region of Interest string, this should be formatted as in HiCat

Parameters:
roi -

getSTLDescription

public String getSTLDescription()
Get the STL Description for the suggestion

Returns:
a String containing the STL Description for the suggestion

setSTLDescription

public void setSTLDescription(String description)
Set the STL Description for the suggestion

Parameters:
description -

getScienceRationale

public String getScienceRationale()
Get the science rationale for the suggestion.

Returns:
the rationale as a String

setScienceRationale

public void setScienceRationale(String rationale)
Set the science rationale for the suggestion.

Parameters:
rationale -

Special_Notes

public String Special_Notes()
Get the Special_Notes field for this suggestion.

Returns:
- a String containing the special notes field.

Special_Notes

public void Special_Notes(String special_notes)
Set the Special_Notes field for this suggestion.

Parameters:
special_notes - - the special notes string

Date_Success

public String Date_Success()
Gets the success date of this suggestion.

Returns:
A String containing the success date if the suggestion has been successfully retired, otherwise the return value is an empty String.

Date_Success

public void Date_Success(String date_success)
Sets the retirement date for this suggestion. Defaults to an empty String.

Parameters:
date_success -

setSuggestionDate

public void setSuggestionDate(String datestring)

getSuggestion_Date

public Calendar getSuggestion_Date()

setAcquiredDate

public void setAcquiredDate(String datestring)

getAcquiredDate

public Calendar getAcquiredDate()

isSuggestionDateAfterAcquired

public boolean isSuggestionDateAfterAcquired()

Retiring_Observation_ID

public String Retiring_Observation_ID()
Gets the observation id which retired this suggestion.

Returns:
the Observation ID String

Retiring_Observation_ID

public void Retiring_Observation_ID(String retiring_observation_id)
Sets the retiring observation id for the suggestion. Defaults to an empty String.

Parameters:
retiring_observation_id -

Child_Observation_ID

public String Child_Observation_ID()
Gets the Child Observation ID of this suggestion if it exists.

Returns:
An Observation ID String or an empty String if there is no Child

Child_Observation_ID

public void Child_Observation_ID(String child_observation_id)
Sets the Child Observation ID String for this suggestion. Defaults to the empty string,

Parameters:
child_observation_id -

Child_Planned_Observations_ID

public void Child_Planned_Observations_ID(int planned_observation_id)
Sets the integer database id of the Child Observation, defaults to -1.

Parameters:
planned_observation_id -

Child_Planned_Observations_ID

public int Child_Planned_Observations_ID()
Get the integer database id of the Child Observation.

Returns:
the integer database id

Is_Mapped

public boolean Is_Mapped()
If the suggestion is a parent of an Observation, then the suggestion will be mapped to the Child Observation.

Returns:
true if the suggestion is mapped, otherwise false.

Classroom_Relation_Created

public boolean Classroom_Relation_Created()
Indicates if the Classroom relationship to the cloned suggestion was properly recreated after the clone was created.

Returns:
true if the relationship was succesfully transferred, otherwise false.
See Also:
Clone_ID()

Classroom_Relation_Created

public void Classroom_Relation_Created(boolean classroom_relation_created)
Sets the success status of creating the classroom relation for the cloned suggestion. This should only be set during the unretirement process.

Parameters:
classroom_relation_created -
See Also:
Clone_ID()

People_Relation_Created

public boolean People_Relation_Created()
Indicates if the relationship of the cloned suggestion to the people table was properly recreated.

Returns:
true if the update was successful, false otherwise.
See Also:
Clone_ID()

People_Relation_Created

public void People_Relation_Created(boolean people_relation_created)
Sets the success status of the creation of the relation of the cloned suggestion to the people table.

Parameters:
people_relation_created - - sets the success value for creating the people relation
See Also:
Clone_ID()

Clone_ID

public int Clone_ID()
Gets the clone suggestion id. If a suggestion that is mapped to an acquired observation is unretired, then a clone of the original suggestion must be created and remapped to the acquired observation. The ID recorded here is the suggestion id of the cloned observation that was remapped to the acquired observation.

Returns:
the remapped suggestion id or -1 if no remapping was required.

Clone_ID

public void Clone_ID(int clone_id)
Sets the suggestion id of the clone if needed. This will be set by the unretirement process.

Parameters:
clone_id - - The remapped observation id.

Science_Themes_Created

public boolean Science_Themes_Created()
Gets the success status of the creation of the science themes relationship for the cloned suggestion.

Returns:
true if the science themes were recreated, otherwise false.
See Also:
Clone_ID()

Science_Themes_Created

public void Science_Themes_Created(boolean science_themes_created)
Sets the success status of the creation of the science themes relations for the cloned suggestion. This should only be set during the unretirement process.

Parameters:
science_themes_created -
See Also:
Clone_ID()

Suggestion_Cloned

public boolean Suggestion_Cloned()
This records whether or not a suggestion needed to be cloned before it was unretired.

Returns:
true if the suggestion was cloned, false otherwise.

Suggestion_Cloned

public void Suggestion_Cloned(boolean suggestion_cloned)
Sets the cloned status of the suggestion.

Parameters:
suggestion_cloned -

isStereo

public void isStereo(boolean status)

isStereo

public boolean isStereo()

First_Half_Observation_ID

public String First_Half_Observation_ID()
If this suggestion is part of a stereo pair, and is mapped to a planned observation this field will return the Observation ID of the first half suggestion is mapped to..

Returns:
A String containing the first half observation id for the stereo pair or an empty string if the suggestion has not yet been mapped or is not part of a stereo pair.

First_Half_Observation_ID

public void First_Half_Observation_ID(String first_half_observation_id)
If the suggestion is part of a stereo pair, this method will set the value of the Observation ID that the first suggestion of the pair is mapped to (if it has been mapped at all).

Parameters:
first_half_observation_id -

First_Half_Stereo

public boolean First_Half_Stereo()
Is this suggestion a first half stereo suggestion?

Returns:
true if the suggestion is a first half suggestion.

First_Half_Stereo_Planned_Observations_ID

public int First_Half_Stereo_Planned_Observations_ID()
Gets the Planned_Observations.ID of the first half stereo suggestion id if this suggestion is part of stereo pair and has been mapped to a planned observation.

Returns:
the first half stereo Planned_Observation.ID id or -1 if this suggestion is not part of a stereo pair

First_Half_Stereo_Planned_Observations_ID

public void First_Half_Stereo_Planned_Observations_ID(int first_Half_Stereo_Planned_Observations_ID)
Sets the Planned_Observations.ID for the first half stereo suggestion if the stereo suggestion has been mapped to a planned observation.

Parameters:
first_Half_Stereo_Planned_Observations_ID -

First_Half_Stereo_Suggestion_ID

public int First_Half_Stereo_Suggestion_ID()
Gets the suggestion id of the first suggestion in the stereo pair.

Returns:
an integer containing the first suggestion id of the stereo pair or -1 if the suggestion is not part of a stereo pair.

First_Half_Stereo_Suggestion_ID

public void First_Half_Stereo_Suggestion_ID(int first_half_stereo_suggestion_id)
Sets the suggestion id of the first suggestion in the stereo pair if this suggestion is part of a stereo pair.

Parameters:
first_half_stereo_suggestion_id -

Second_Half_Stereo

public boolean Second_Half_Stereo()
Is the suggestion a second half stereo suggestion?

Returns:
true if the is a second half stereo suggestion false if it's not a second half suggestion or is not part of a stereo pair.

Second_Half_Stereo

public void Second_Half_Stereo(boolean second_half_stereo)
Sets the Second Half Stereo flag, for the object.

Parameters:
second_half_stereo -

Second_Half_Stereo_Observation_ID

public String Second_Half_Stereo_Observation_ID()
Returns the observation id of the second half stereo observation if the second half suggestion has been mapped to an observation.

Returns:
A String containing an observation id if the suggestion has been mapped, otherwise and empty String.

Second_Half_Stereo_Observation_ID

public void Second_Half_Stereo_Observation_ID(String second_half_stereo_observation_id)
Sets the second half stereo observation id for this suggestion if it is part of a stereo pair and the second half observation has been planned.

Parameters:
second_half_stereo_observation_id -

Second_Half_Stereo_Planned_Observations_ID

public int Second_Half_Stereo_Planned_Observations_ID()
Gets the Planned_Observations.ID of the second half stereo observation if it exists.

Returns:
a Planned_Observations.ID if it exists, -1 otherwise.

Second_Half_Stereo_Planned_Observations_ID

public void Second_Half_Stereo_Planned_Observations_ID(int second_half_stereo_planned_observations_id)
Sets the Planned_Observations.ID of the second half stereo suggestion, if it exists.

Parameters:
second_half_stereo_planned_observations_id -

Second_Half_Stereo_Suggestion_ID

public int Second_Half_Stereo_Suggestion_ID()
Gets the second half stereo suggestion id if it exists.

Returns:
an integer containing the second half stereo id, or -1 if there is no second half suggestion id.

Second_Half_Stereo_Suggestion_ID

public void Second_Half_Stereo_Suggestion_ID(int second_half_stereo_suggestion_id)
Sets the second half stereo suggestion id for the suggestion if it is part of a stereo pair.

Parameters:
second_half_stereo_suggestion_id -

Unretirement_Message

public String Unretirement_Message()
Get the unretirement message. This message would be appended to the special notes field of an unretired suggestion.

Returns:
the uretirement message, if provided.

Unretirement_Message

public void Unretirement_Message(String unretirement_message)
Set the unretirement message for this suggestion.

Parameters:
unretirement_message -

Unretirement_Request_Flag

public boolean Unretirement_Request_Flag()

Unretirement_Request_Flag

public void Unretirement_Request_Flag(boolean flag)

Unretirement_Successfull

public boolean Unretirement_Successfull()

Unretirement_Successfull

public void Unretirement_Successfull(boolean success_status)

HiRISE

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