HiRISE

HiRISE.HiCat.Utilities
Class Retire_Suggestions.Messages

java.lang.Object
  extended by HiRISE.HiCat.Utilities.Retire_Suggestions.Messages
Enclosing class:
Retire_Suggestions

public static class Retire_Suggestions.Messages
extends Object

The Messages class is a little data structure used for holding informational and warning messages that might be generated during the process of retiring a Suggested Observation. A separate instance of this class will be generated for each Suggested Observation that may be retired by a given a Observation.

Special attention should be paid to messages that are associated with the parent suggestion. Even if the parent suggestion was successfully retired, warning messages may have been generated to indicate such things as overlapping stereo targets or other instances where an overlapping suggestion might get retired but was not retired due to some special case that might warrant some attention on the part of the planner.

In addition, overriding the default retirement operation can be accomplished by resetting the willRetire(boolean) method to the appropriate value and passing the Map back to the retireSuggestions(String,Map) method.

Author:
Rodney Heyd UA/HiRISE

Constructor Summary
Retire_Suggestions.Messages()
          Instantiate the class with empty warning messages, and all boolean flags set to false.
 
Method Summary
 void addWarning(String message)
          This method is called by the Retire_Suggestions class to store warning messages generated during the retirement process.
 void appendInformation(String message)
          This method is called by the Retire_Suggestions class to store messages generated during the retirement process
 String getScienceRationale()
          Get the science rationale for the associated suggestion
 String getSpecialNotes()
          Get the special notes for the suggestion
 String getSTLDescription()
          Get the STL Description for the associated suggestion
 int getSuggestionId()
          Get the Suggestion ID this Messages class was created for.
 boolean isParent()
          Indicates if the suggestion this Messages object was generated for is the parent of the retiring observation.
 boolean isRetired()
           
 void isRetired(boolean status)
          This method is called by the Retire_Suggestions class during the retiring process to indicate if the retiring process was successful.
 void setParent(boolean status)
          Set the parent status on the messages class.
 void setScienceRationale(String description)
          Set the science rationale for the associated suggestion
 void setSpecialNotes(String notes)
          Set the special notes for the target
 void setSTLDescription(String description)
          Sets the STL Description
 void setSuggestionId(int suggestionId)
          Set the Suggestion Id this Messages instance has been generated for.
 ArrayList<String> statusMessages()
          Get the list of status messages that may have been generated during the retirement process.
 ArrayList<String> warningMessages()
          Gets any warning messages that were generated during the retirement process.
 boolean Warnings()
          A boolean value that gets set if any warning messages were generated during the retirement process.
 boolean willRetire()
          Get the success status that was generated during the retirement process.
 void willRetire(boolean status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Retire_Suggestions.Messages

public Retire_Suggestions.Messages()
Instantiate the class with empty warning messages, and all boolean flags set to false.

Method Detail

warningMessages

public ArrayList<String> warningMessages()
Gets any warning messages that were generated during the retirement process. The messages are returned as a HashMap with suggestion Ids as keys mapped to an ArrayList of one or more warning messages. The suggestion Ids keyed in the map are the Ids for which the warnings were generated.

Returns:
A String of one or more warning messages.
See Also:
Warnings()

statusMessages

public ArrayList<String> statusMessages()
Get the list of status messages that may have been generated during the retirement process. Status messages are strictly informational and useful for logging purposes/verbose purposes, but aren't especially important otherwise.

Returns:
An ArrayList of Strings containing the status messages generated during the retirement of a Suggested Observation, the list can be empty.

appendInformation

public void appendInformation(String message)
This method is called by the Retire_Suggestions class to store messages generated during the retirement process

Parameters:
message - A string containing a status message.

addWarning

public void addWarning(String message)
This method is called by the Retire_Suggestions class to store warning messages generated during the retirement process.

Parameters:
message - A string containing a warning message.

Warnings

public boolean Warnings()
A boolean value that gets set if any warning messages were generated during the retirement process. If this method returns true, then the warningMessages() method should be called to get the warnings messages that were generated.

Returns:
true if warnings were generated during the retirement process, false otherwise.
See Also:
warningMessages()

setSuggestionId

public void setSuggestionId(int suggestionId)
Set the Suggestion Id this Messages instance has been generated for.

Parameters:
suggestionId - - an integer ID, this should the Suggestion ID stored in the Suggested_Observations table in HiCat.

getSuggestionId

public int getSuggestionId()
Get the Suggestion ID this Messages class was created for.

Returns:
an int

setParent

public void setParent(boolean status)
Set the parent status on the messages class. This method is called during the retirement process. If the target suggestion being retired is the "parent" suggestion of the retiring observation, this should be set to true, otherwise it should be false.

Parameters:
status - a boolean value indicating if the suggestion is the parent of the retiring observation.

isParent

public boolean isParent()
Indicates if the suggestion this Messages object was generated for is the parent of the retiring observation.

Returns:
true if the suggestion is the parent of the retiring observation, false otherwise.

isRetired

public void isRetired(boolean status)
This method is called by the Retire_Suggestions class during the retiring process to indicate if the retiring process was successful.

Parameters:
status - true if the retiring process succeded, false otherwise.

isRetired

public boolean isRetired()

willRetire

public void willRetire(boolean status)

willRetire

public boolean willRetire()
Get the success status that was generated during the retirement process. Note: Warnings could still be generated even if a suggestion was successfully retired.

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

setSTLDescription

public void setSTLDescription(String description)
Sets the STL Description

Parameters:
description -

getSTLDescription

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

Returns:
A Sting containing the STL description

setScienceRationale

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

Parameters:
description -

getScienceRationale

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

Returns:
A string containing the suggestion's rationale

setSpecialNotes

public void setSpecialNotes(String notes)
Set the special notes for the target

Parameters:
notes -

getSpecialNotes

public String getSpecialNotes()
Get the special notes for the suggestion

Returns:
the special notes String

HiRISE

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