HiRISE

HiRISE.HiWish
Class SuggestionForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by HiRISE.HiWish.SuggestionForm
All Implemented Interfaces:
Serializable

public class SuggestionForm
extends org.apache.struts.action.ActionForm

Stores input from the 'create suggestion' form.

See Also:
Serialized Form

Field Summary
static int DEFAULT_BINNING
          default to 4x4 binning
static float DEFAULT_EMA_MAX
          default emission angle maximum in degrees
static float DEFAULT_EMA_MIN
          default emission angle minimum in degrees
static float DEFAULT_INA_MAX
          default incidence angle maximum in degrees
static float DEFAULT_INA_MIN
          default incidence angle minimum in degrees
static float DEFAULT_LS_MAX
          default solar longitude maximum in degrees
static float DEFAULT_LS_MIN
          default solar longitude minimum in degrees
static float DEFAULT_PHA_MAX
          default phase angle maximum in degrees
static float DEFAULT_PHA_MIN
          default phase angle minimum in degrees
static int DEFAULT_PRIORITY
          default priority
static int DEFAULT_SEASON
          default season (0 = no particular season)
static int DEFAULT_THEME
          default science theme (0 = none selected)
static int DEFAULT_ZOOM
          default zoom level
static float EMA_MAX
          emission angle maximum
static float INA_MAX
          incidence angle maximum
static int MAX_CHARACTERS
          number of characters allowed in text fields
static int OBSERVATION_COUNT_MAX
          the maximum number of observations
static Pattern RE_ALLOWED_TITLE
          Allowed characters in title
static Suggestion.ScienceTheme[] THEMES
          array of themes
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
SuggestionForm()
           
 
Method Summary
 String getAction()
          For dispatch actions, get the requested input action
 int getBackground()
          Get the background
 int getBinning()
          Get the bin mode requested
 List<double[]> getCoordinates()
          Parse the ROI vertices input and return a list of min, max ranges.
 int getCount()
          Get the number of observations requested
 boolean getCrism()
          True if CRISM coordination is requested
 String getCrismNote()
          Get the CRISM justification note.
 float getLat()
          Get the center latitude
 int getLines()
          Get the number of image lines, 0 = use editor default
 float getLon()
          Get the center longitude
 List<double[]> getLsConstraints()
          Parse the lsRanges input and return a list of min, max ranges.
 String getLsRanges()
          For split suggestions, the encoded list of min,max Ls values
 float getMaxEmission()
          Get the max emission angle
 float getMaxIncidence()
          Get the max incidence angle
 float getMaxLs()
          Get the max solar longitude
 float getMaxPhase()
          Set the max phase angle
 float getMinEmission()
          Get the min emission angle
 float getMinIncidence()
          Get the min incidence angle
 float getMinLs()
          Get the min solar longitude
 float getMinPhase()
          Get the min phase angle
 String getNotes()
          Get the special notes for this suggestion
 int getPrimaryTheme()
          Get the ID of the primary science theme
 int getPriority()
          Get the priority
 String getRationale()
          Get the science rationale
 String getRepeatNote()
           
 String getResolutionNote()
          Get the resolution (binning) justification note.
 String getRoi()
          Get the ROI string (encoded as lon, lat pairs)
 int getSeason()
          Get the season requested (0=none, 1=Northern Spring, etc).
 int getSecondaryTheme()
          Get the secondary science theme
 boolean getShowCast()
          If true, Cast footprints should be shown
 boolean getShowCRISM()
          If true, CRISM footprints should be shown
 boolean getShowCTX()
          If true, CTX footprints should be shown
 boolean getShowHiT()
          If true, HiRISE target footprints should be shown
 boolean getShowMOC()
          If true, MOC footprints should be shown
 boolean getShowRDR()
          If true, HiRISE RED RDR footprints should be shown
 boolean getStereo()
          True if this is a stereo suggestion
 boolean getStereocap()
           
 String getStereoCapId()
           
 String getStereoNote()
          Get the stereo justification note
 String getTitle()
          Get the title (description)
 int getZoom()
          Get the zoom level
 boolean isAdvanced()
          True if this is an advanced suggestion
 boolean isCrism()
          True if CRISM coordination is requested
 boolean isSplit()
          If true, create multiple suggestions with individual Ls ranges.
 boolean isStereo()
          True if this is a stereo suggestion
static List<double[]> roi2coordinates(String roi)
          Parse a ROI string into decimal lat-lon values
 void setAction(String action)
          For dispatch actions, set the requested input action
 void setBackground(int background)
          Set the background to display
 void setBinning(int binning)
          Set the bin mode requested
 void setCount(int count)
          Set the number of observations requested
 void setCrism(boolean crism)
          Set to true for CRISM coordination request
 void setCrismNote(String crismNote)
          Set the CRISM justification note
 void setLat(Double lat)
          Set the center latitude
 void setLat(float lat)
          Set the center latitude
 void setLines(int lines)
          Set the number of image lines
 void setLon(Double lon)
          Set the center longitude
 void setLon(float lon)
          Set the center longitude
 void setLsRanges(String lsRanges)
          For split suggestions, set the encoded list of min,max Ls values
 void setMaxEmission(float maxEmission)
          Set the max emission angle
 void setMaxIncidence(float maxIncidence)
          Set the max incidence angle
 void setMaxLs(float maxLs)
          Set the max solar longitude
 void setMaxPhase(float maxPhase)
          Set the max phase angle
 void setMinEmission(float minEmission)
          Set the min emission angle
 void setMinIncidence(float minIncidence)
          Set the min incidence angle
 void setMinLs(float minLs)
          Set the min solar longitude
 void setMinPhase(float minPhase)
          Set the min phase angle
 void setNotes(String notes)
          Set the special notes for this suggestion
 void setPrimaryTheme(int primaryTheme)
          Set the primary science theme
 void setPriority(int priority)
          Set the priority.
 void setRationale(String rationale)
          Set the science rationale
 void setRepeatNote(String repeatNote)
           
 void setResolutionNote(String resolutionNote)
          Set the resolution (binning) justification note.
 void setRoi(String roi)
          Set the region of interest vertices
 void setSeason(int season)
          Set the season requested
 void setSecondaryTheme(int secondaryTheme)
          Set the secondary science theme
 void setShowCast(boolean showCast)
          Show or hide Cast image footprints
 void setShowCRISM(boolean showCRISM)
          Show or hide CRISM image footprints
 void setShowCTX(boolean showCTX)
          Show or hide CTX image footprints
 void setShowHiT(boolean showHiT)
          Show or hide HiRISE target footprints
 void setShowMOC(boolean showMOC)
          Show or hide MOC image footprints
 void setShowRDR(boolean showRDR)
          Show or hide HiRISE RED RDR footprints
 void setSplit(boolean split)
          Set to true to create multiple suggestions with individual Ls ranges.
 void setStereo(boolean stereo)
          Set to true for a stereo suggestion
 void setStereocap(boolean stereocap)
           
 void setStereoCapId(String stereoCapId)
           
 void setStereoNote(String stereoNote)
          Set the stereo justification note
 void setTitle(String title)
          Set the title (description)
 void setZoom(int zoom)
          Set the zoom level
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map, javax.servlet.http.HttpServletRequest req)
           
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THEMES

public static final Suggestion.ScienceTheme[] THEMES
array of themes


RE_ALLOWED_TITLE

public static final Pattern RE_ALLOWED_TITLE
Allowed characters in title


DEFAULT_BINNING

public static final int DEFAULT_BINNING
default to 4x4 binning

See Also:
Constant Field Values

DEFAULT_ZOOM

public static final int DEFAULT_ZOOM
default zoom level

See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
default priority

See Also:
Constant Field Values

DEFAULT_THEME

public static final int DEFAULT_THEME
default science theme (0 = none selected)

See Also:
Constant Field Values

DEFAULT_SEASON

public static final int DEFAULT_SEASON
default season (0 = no particular season)

See Also:
Constant Field Values

DEFAULT_LS_MIN

public static final float DEFAULT_LS_MIN
default solar longitude minimum in degrees

See Also:
Constant Field Values

DEFAULT_LS_MAX

public static final float DEFAULT_LS_MAX
default solar longitude maximum in degrees

See Also:
Constant Field Values

DEFAULT_EMA_MIN

public static final float DEFAULT_EMA_MIN
default emission angle minimum in degrees

See Also:
Constant Field Values

DEFAULT_EMA_MAX

public static final float DEFAULT_EMA_MAX
default emission angle maximum in degrees

See Also:
Constant Field Values

DEFAULT_INA_MIN

public static final float DEFAULT_INA_MIN
default incidence angle minimum in degrees

See Also:
Constant Field Values

DEFAULT_INA_MAX

public static final float DEFAULT_INA_MAX
default incidence angle maximum in degrees

See Also:
Constant Field Values

DEFAULT_PHA_MIN

public static final float DEFAULT_PHA_MIN
default phase angle minimum in degrees

See Also:
Constant Field Values

DEFAULT_PHA_MAX

public static final float DEFAULT_PHA_MAX
default phase angle maximum in degrees

See Also:
Constant Field Values

OBSERVATION_COUNT_MAX

public static final int OBSERVATION_COUNT_MAX
the maximum number of observations

See Also:
Constant Field Values

INA_MAX

public static final float INA_MAX
incidence angle maximum

See Also:
Constant Field Values

EMA_MAX

public static final float EMA_MAX
emission angle maximum

See Also:
Constant Field Values

MAX_CHARACTERS

public static final int MAX_CHARACTERS
number of characters allowed in text fields

See Also:
Constant Field Values
Constructor Detail

SuggestionForm

public SuggestionForm()
Method Detail

getAction

public String getAction()
For dispatch actions, get the requested input action

Returns:
action name

setAction

public void setAction(String action)
For dispatch actions, set the requested input action

Parameters:
action - Corresponds to the state of the process

setStereoCapId

public void setStereoCapId(String stereoCapId)

getStereoCapId

public String getStereoCapId()

setStereocap

public void setStereocap(boolean stereocap)

getStereocap

public boolean getStereocap()

getLsConstraints

public List<double[]> getLsConstraints()
                                throws ParseException
Parse the lsRanges input and return a list of min, max ranges.

Returns:
min,max list
Throws:
ParseException - Invalid input

getCoordinates

public List<double[]> getCoordinates()
Parse the ROI vertices input and return a list of min, max ranges.

Returns:
list of lat-lon values

roi2coordinates

public static List<double[]> roi2coordinates(String roi)
                                      throws ParseException
Parse a ROI string into decimal lat-lon values

Parameters:
roi - Region of Interest as CSV string
Returns:
list of lat-lon values
Throws:
ParseException - invalid coordinate(s)

getRoi

public String getRoi()
Get the ROI string (encoded as lon, lat pairs)

Returns:
ROI vertices

setRoi

public void setRoi(String roi)
Set the region of interest vertices

Parameters:
roi - encoded lon-lat coordinates

getZoom

public int getZoom()
Get the zoom level

Returns:
google map zoom level

setZoom

public void setZoom(int zoom)
Set the zoom level

Parameters:
zoom - google map zoom level

getLines

public int getLines()
Get the number of image lines, 0 = use editor default

Returns:
number of image lines

setLines

public void setLines(int lines)
Set the number of image lines

Parameters:
lines - number of image lines

getLat

public float getLat()
Get the center latitude

Returns:
degrees latitude

getLon

public float getLon()
Get the center longitude

Returns:
degrees longitude

setLat

public void setLat(float lat)
Set the center latitude

Parameters:
lat - degrees latitude

setLon

public void setLon(float lon)
Set the center longitude

Parameters:
lon - degrees longitude

setLat

public void setLat(Double lat)
Set the center latitude

Parameters:
lat - degrees latitude

setLon

public void setLon(Double lon)
Set the center longitude

Parameters:
lon - degrees longitude

getBinning

public int getBinning()
Get the bin mode requested

Returns:
binning

setBinning

public void setBinning(int binning)
Set the bin mode requested

Parameters:
binning - 1,2, or 4

getCount

public int getCount()
Get the number of observations requested

Returns:
number of observations

setCount

public void setCount(int count)
Set the number of observations requested

Parameters:
count - number of observations

getCrismNote

public String getCrismNote()
Get the CRISM justification note.

Returns:
CRISM note

setCrismNote

public void setCrismNote(String crismNote)
Set the CRISM justification note

Parameters:
crismNote - justification text

getMaxEmission

public float getMaxEmission()
Get the max emission angle

Returns:
degrees

setMaxEmission

public void setMaxEmission(float maxEmission)
Set the max emission angle

Parameters:
maxEmission - degrees

getMaxIncidence

public float getMaxIncidence()
Get the max incidence angle

Returns:
degrees

setMaxIncidence

public void setMaxIncidence(float maxIncidence)
Set the max incidence angle

Parameters:
maxIncidence - degrees

getMaxLs

public float getMaxLs()
Get the max solar longitude

Returns:
degrees

setMaxLs

public void setMaxLs(float maxLs)
Set the max solar longitude

Parameters:
maxLs - degrees

getMaxPhase

public float getMaxPhase()
Set the max phase angle

Returns:
degrees

setMaxPhase

public void setMaxPhase(float maxPhase)
Set the max phase angle

Parameters:
maxPhase - degrees

getMinEmission

public float getMinEmission()
Get the min emission angle

Returns:
degrees

setMinEmission

public void setMinEmission(float minEmission)
Set the min emission angle

Parameters:
minEmission - degrees

getMinIncidence

public float getMinIncidence()
Get the min incidence angle

Returns:
degrees

setMinIncidence

public void setMinIncidence(float minIncidence)
Set the min incidence angle

Parameters:
minIncidence - degrees

getMinLs

public float getMinLs()
Get the min solar longitude

Returns:
degrees

setMinLs

public void setMinLs(float minLs)
Set the min solar longitude

Parameters:
minLs - degrees

getMinPhase

public float getMinPhase()
Get the min phase angle

Returns:
degrees

setMinPhase

public void setMinPhase(float minPhase)
Set the min phase angle

Parameters:
minPhase - degrees

getNotes

public String getNotes()
Get the special notes for this suggestion

Returns:
text

setNotes

public void setNotes(String notes)
Set the special notes for this suggestion

Parameters:
notes - text

getPrimaryTheme

public int getPrimaryTheme()
Get the ID of the primary science theme

Returns:
science theme ID

setPrimaryTheme

public void setPrimaryTheme(int primaryTheme)
Set the primary science theme

Parameters:
primaryTheme - science theme ID

getPriority

public int getPriority()
Get the priority

Returns:
priority value

setPriority

public void setPriority(int priority)
Set the priority.

Parameters:
priority - value

getRationale

public String getRationale()
Get the science rationale

Returns:
text

setRationale

public void setRationale(String rationale)
Set the science rationale

Parameters:
rationale - text

getResolutionNote

public String getResolutionNote()
Get the resolution (binning) justification note.

Returns:
justification text

setResolutionNote

public void setResolutionNote(String resolutionNote)
Set the resolution (binning) justification note.

Parameters:
resolutionNote - text

getSecondaryTheme

public int getSecondaryTheme()
Get the secondary science theme

Returns:
science theme ID

setSecondaryTheme

public void setSecondaryTheme(int secondaryTheme)
Set the secondary science theme

Parameters:
secondaryTheme - science theme ID

isAdvanced

public boolean isAdvanced()
True if this is an advanced suggestion

Returns:
true for advanced

getStereo

public boolean getStereo()
True if this is a stereo suggestion

Returns:
true for stereo

isStereo

public boolean isStereo()
True if this is a stereo suggestion

Returns:
true for stereo

setStereo

public void setStereo(boolean stereo)
Set to true for a stereo suggestion

Parameters:
stereo - true for stereo

getStereoNote

public String getStereoNote()
Get the stereo justification note

Returns:
text

setStereoNote

public void setStereoNote(String stereoNote)
Set the stereo justification note

Parameters:
stereoNote - text

getTitle

public String getTitle()
Get the title (description)

Returns:
title text

setTitle

public void setTitle(String title)
Set the title (description)

Parameters:
title - short description of suggestion

getCrism

public boolean getCrism()
True if CRISM coordination is requested

Returns:
true for CRISM coordination

isCrism

public boolean isCrism()
True if CRISM coordination is requested

Returns:
true for CRISM coordination

setCrism

public void setCrism(boolean crism)
Set to true for CRISM coordination request

Parameters:
crism - true for CRISM coordination

getSeason

public int getSeason()
Get the season requested (0=none, 1=Northern Spring, etc).

Returns:
season

setSeason

public void setSeason(int season)
Set the season requested

Parameters:
season - 0=none, 1=Northern Spring, etc

getLsRanges

public String getLsRanges()
For split suggestions, the encoded list of min,max Ls values

Returns:
encoded list of min,max values

setLsRanges

public void setLsRanges(String lsRanges)
For split suggestions, set the encoded list of min,max Ls values

Parameters:
lsRanges - encoded list of min,max values

isSplit

public boolean isSplit()
If true, create multiple suggestions with individual Ls ranges.

Returns:
true for split suggestions

setSplit

public void setSplit(boolean split)
Set to true to create multiple suggestions with individual Ls ranges.

Parameters:
split - true to use multiple Ls ranges

setRepeatNote

public void setRepeatNote(String repeatNote)
Parameters:
repeatNote - the repeatNote to set

getRepeatNote

public String getRepeatNote()
Returns:
the repeatNote

getBackground

public int getBackground()
Get the background

Returns:
background index

setBackground

public void setBackground(int background)
Set the background to display

Parameters:
background - Background index value

getShowHiT

public boolean getShowHiT()
If true, HiRISE target footprints should be shown

Returns:
show HiRISE target footprints

getShowRDR

public boolean getShowRDR()
If true, HiRISE RED RDR footprints should be shown

Returns:
show HiRISE RED RDR footprints

getShowCTX

public boolean getShowCTX()
If true, CTX footprints should be shown

Returns:
show CTX footprints

getShowCRISM

public boolean getShowCRISM()
If true, CRISM footprints should be shown

Returns:
show CRISM footprints

getShowMOC

public boolean getShowMOC()
If true, MOC footprints should be shown

Returns:
show MOC footprints

getShowCast

public boolean getShowCast()
If true, Cast footprints should be shown

Returns:
show Cast footprints

setShowHiT

public void setShowHiT(boolean showHiT)
Show or hide HiRISE target footprints

Parameters:
showHiT - show = true

setShowRDR

public void setShowRDR(boolean showRDR)
Show or hide HiRISE RED RDR footprints

Parameters:
showRDR - show = true

setShowCTX

public void setShowCTX(boolean showCTX)
Show or hide CTX image footprints

Parameters:
showCTX - show = true

setShowCRISM

public void setShowCRISM(boolean showCRISM)
Show or hide CRISM image footprints

Parameters:
showCRISM - show = true

setShowMOC

public void setShowMOC(boolean showMOC)
Show or hide MOC image footprints

Parameters:
showMOC - show = true

setShowCast

public void setShowCast(boolean showCast)
Show or hide Cast image footprints

Parameters:
showCast - show = true

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map,
                                                      javax.servlet.http.HttpServletRequest req)
Overrides:
validate in class org.apache.struts.action.ActionForm

HiRISE

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