HiRISE

HiRISE.HiReport.form
Class OrbitCycleForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by HiRISE.HiReport.form.PageSortForm
          extended by HiRISE.HiReport.form.TimeRangeForm
              extended by HiRISE.HiReport.form.OrbitCycleForm
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CtxSearchForm, GeometryOffsetForm, HiSearchForm, ProductStatusForm, SearchForm

public class OrbitCycleForm
extends TimeRangeForm

Form base class for orbit-cycle actions

See Also:
Serialized Form

Nested Class Summary
static class OrbitCycleForm.RangeUnit
          Range choices
 
Field Summary
protected  OrbitCycleForm.RangeUnit by
          Which range unit to use
protected  float cenLat
          Center latitude ('ocentric)
protected  float cenLon
          Center longitude (east)
protected  int maxCycle
          Ending cycle ID
protected  float maxLat
          Maximum latitude ('ocentric)
protected  float maxLon
          Maximum longitude (east)
protected  float maxLs
          Maximum solar longitude
protected  int maxMy
          Maximum Mars year
protected  int maxOrbit
          Maximum orbit number
protected  int minCycle
          Starting cycle ID
protected  float minLat
          Minimum latitude ('ocentric)
protected  float minLon
          Minimum longitude (east)
protected  float minLs
          Minimum solar longitude
protected  int minMy
          Minimum Mars year
protected  int minOrbit
          Minimum orbit number
protected  float range
          Range from center (degrees)
protected  MartianSeason season
          season name, corresponding to one of the keys in the seasons enum
protected  String[] target
          Target array
 
Fields inherited from class HiRISE.HiReport.form.TimeRangeForm
ID, maxDate, minDate, plus, TIME_FORMATS, timeFormatters, timeUnits, unit
 
Fields inherited from class HiRISE.HiReport.form.PageSortForm
EXPORT_MAX_ROWS
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
OrbitCycleForm()
           
 
Method Summary
protected
<T> void
checkArray(T t, T[] array, String key, org.apache.struts.action.ActionErrors errors, String msg)
          Check that an item is in an array, which may be unsorted.
 String getBy()
          Get the value of by (units of range, either km or deg, null if not set)
 float getCenLat()
          Get the center latitude
 float getCenLon()
          Get the center longitude
 MartianSeason getMartianSeason()
          Get the season instance, if a season was requested, otherwise null
 int getMaxCycle()
          Return the maximum cycle (or zero, if unset)
 String getMaxDate()
          Get the max date, or null if no max date has been input
 float getMaxLat()
          Get the maximum latitude
 float getMaxLon()
          Get the maximum longitude
 float getMaxLs()
          Get the maximum solar longitude
 int getMaxMy()
          Get the maximum Mars year
 int getMaxOrbit()
          Get the maximum orbit number
 int getMinCycle()
          Return the minimum cycle (or zero, if unset)
 String getMinDate()
          Get the start date, or null if no min date has been input
 float getMinLat()
          Get the minimum latitude
 float getMinLon()
          Get the minimum longitude
 float getMinLs()
          Get the minimum solar longitude
 int getMinMy()
          Get the minimum Mars year
 int getMinOrbit()
          Get the minimum orbit number
 int getNextMaxCycle()
          Get the maximum cycle number in the range following this one
 int getNextMaxOrbit()
          Get the maximum orbit number in the range following this one
 int getNextMinCycle()
          Get the minimum cycle number in the range following this one
 int getNextMinOrbit()
          Get the minimum orbit number in the range following this one
 int getPrevMaxCycle()
          Get the maximum cycle number in the range preceding this one
 int getPrevMaxOrbit()
          Get the maximum orbit number in the range preceding this one
 int getPrevMinCycle()
          Get the minimum cycle number in the range preceding this one
 int getPrevMinOrbit()
          Get the minimum orbit number in the range preceding this one
 float getRange()
          Get the range in KM (zero for no range)
 String getSeason()
          Get the input season value
 MartianSeason[] getSeasons()
          Get the array of possible season names.
 String[] getTarget()
          Get the target names
 boolean isMartian()
          Returns true if Mars is one of the targets input to the form
 void setBy(String by)
          Set the value of by (units of range, either km or deg)
 void setCenLat(float cenLat)
          Set the center latitude
 void setCenLon(float cenLon)
          Set the center longitude
 void setMaxCycle(int maxCycle)
          Set the maximum cycle
 void setMaxLat(float maxLat)
          Set the maximum latitude
 void setMaxLon(float maxLon)
          Set the maximum longitude
 void setMaxLs(float maxLs)
          Set the maximum solar longitude
 void setMaxMy(int maxMy)
          Set the maximum Mars year
 void setMaxOrbit(int maxOrbit)
          Set the maximum orbit number
 void setMinCycle(int minCycle)
          Set the minimum cycle
 void setMinLat(float minLat)
          Set the minimum latitude
 void setMinLon(float minLon)
          Get the minimum longitude
 void setMinLs(float minLs)
          Set the minimum solar longitude
 void setMinMy(int minMy)
          Set the minimum Mars year
 void setMinOrbit(int minOrbit)
          Set the minimum orbit number
 void setRange(float range)
          Set the range in KM
 void setSeason(String season)
          Set the season
 void setTarget(String... target)
          Set the target names
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest req)
          Validate the form input
 
Methods inherited from class HiRISE.HiReport.form.TimeRangeForm
getPlus, getTimeRange, getTimeUnit, getTimeUnits, parseDate, setMaxDate, setMinDate, setPlus, setTimeRange, setTimeUnit
 
Methods inherited from class HiRISE.HiReport.form.PageSortForm
getDir, getPage, getSize, getSort, isAscending, reset, setDir, setPage, setSize, setSort
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

season

protected MartianSeason season
season name, corresponding to one of the keys in the seasons enum


minLs

protected float minLs
Minimum solar longitude


maxLs

protected float maxLs
Maximum solar longitude


minMy

protected int minMy
Minimum Mars year


maxMy

protected int maxMy
Maximum Mars year


minOrbit

protected int minOrbit
Minimum orbit number


maxOrbit

protected int maxOrbit
Maximum orbit number


minCycle

protected int minCycle
Starting cycle ID


maxCycle

protected int maxCycle
Ending cycle ID


minLat

protected float minLat
Minimum latitude ('ocentric)


maxLat

protected float maxLat
Maximum latitude ('ocentric)


minLon

protected float minLon
Minimum longitude (east)


maxLon

protected float maxLon
Maximum longitude (east)


cenLat

protected float cenLat
Center latitude ('ocentric)


cenLon

protected float cenLon
Center longitude (east)


range

protected float range
Range from center (degrees)


by

protected OrbitCycleForm.RangeUnit by
Which range unit to use


target

protected String[] target
Target array

Constructor Detail

OrbitCycleForm

public OrbitCycleForm()
Method Detail

isMartian

public boolean isMartian()
Returns true if Mars is one of the targets input to the form

Returns:
true for Mars

getSeasons

public MartianSeason[] getSeasons()
Get the array of possible season names.

Returns:
season names

getSeason

public String getSeason()
Get the input season value

Returns:
season input

setSeason

public void setSeason(String season)
Set the season

Parameters:
season -
See Also:
MartianSeason

getMartianSeason

public MartianSeason getMartianSeason()
Get the season instance, if a season was requested, otherwise null

Returns:
season or null

setTarget

public void setTarget(String... target)
Set the target names

Parameters:
target - name of targets

getTarget

public String[] getTarget()
Get the target names

Returns:
target names

getBy

public String getBy()
Get the value of by (units of range, either km or deg, null if not set)

Returns:
search by

setBy

public void setBy(String by)
Set the value of by (units of range, either km or deg)

Parameters:
by - search by

getMinOrbit

public int getMinOrbit()
Get the minimum orbit number

Returns:
minimum orbit number

getMaxOrbit

public int getMaxOrbit()
Get the maximum orbit number

Returns:
maximum orbit number

setMinOrbit

public void setMinOrbit(int minOrbit)
Set the minimum orbit number

Parameters:
minOrbit - minimum orbit number

setMaxOrbit

public void setMaxOrbit(int maxOrbit)
Set the maximum orbit number

Parameters:
maxOrbit - maximum orbit number

getMinCycle

public int getMinCycle()
Return the minimum cycle (or zero, if unset)

Returns:
minimum cycle

setMinCycle

public void setMinCycle(int minCycle)
Set the minimum cycle

Parameters:
minCycle - cycle ID

getMaxCycle

public int getMaxCycle()
Return the maximum cycle (or zero, if unset)

Returns:
maximum cycle

setMaxCycle

public void setMaxCycle(int maxCycle)
Set the maximum cycle

Parameters:
maxCycle - cycle ID

getMinLs

public float getMinLs()
Get the minimum solar longitude

Returns:
degrees solar longitude

setMinLs

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

Parameters:
minLs - degrees solar longitude

getMaxLs

public float getMaxLs()
Get the maximum solar longitude

Returns:
degrees solar longitude

setMaxLs

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

Parameters:
maxLs - degrees solar longitude

getMinMy

public int getMinMy()
Get the minimum Mars year

Returns:
minimum Mars year

getMaxMy

public int getMaxMy()
Get the maximum Mars year

Returns:
maximum Mars year

setMinMy

public void setMinMy(int minMy)
Set the minimum Mars year

Parameters:
minMy - minimum Mars year

setMaxMy

public void setMaxMy(int maxMy)
Set the maximum Mars year

Parameters:
maxMy - maximum Mars year

getMinLat

public float getMinLat()
Get the minimum latitude

Returns:
degrees

getMaxLat

public float getMaxLat()
Get the maximum latitude

Returns:
degrees

setMinLat

public void setMinLat(float minLat)
Set the minimum latitude

Parameters:
minLat - degrees

setMaxLat

public void setMaxLat(float maxLat)
Set the maximum latitude

Parameters:
maxLat -

getMinLon

public float getMinLon()
Get the minimum longitude

Returns:
degrees

getMaxLon

public float getMaxLon()
Get the maximum longitude

Returns:
degrees

setMinLon

public void setMinLon(float minLon)
Get the minimum longitude

Parameters:
minLon - degrees 0 - 360

setMaxLon

public void setMaxLon(float maxLon)
Set the maximum longitude

Parameters:
maxLon - degrees 0 - 360

getCenLat

public float getCenLat()
Get the center latitude

Returns:
degrees

getCenLon

public float getCenLon()
Get the center longitude

Returns:
degrees 0-360

setCenLat

public void setCenLat(float cenLat)
Set the center latitude

Parameters:
cenLat - degrees

setCenLon

public void setCenLon(float cenLon)
Set the center longitude

Parameters:
cenLon - degrees 0 - 360

getRange

public float getRange()
Get the range in KM (zero for no range)

Returns:
kilometers

setRange

public void setRange(float range)
Set the range in KM

Parameters:
range - kilometers

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest req)
Validate the form input

Overrides:
validate in class TimeRangeForm

getNextMinOrbit

public int getNextMinOrbit()
Get the minimum orbit number in the range following this one

Returns:
next minimum orbit number

getNextMaxOrbit

public int getNextMaxOrbit()
Get the maximum orbit number in the range following this one

Returns:
next maximum orbit number

getPrevMinOrbit

public int getPrevMinOrbit()
Get the minimum orbit number in the range preceding this one

Returns:
next minimum orbit number

getPrevMaxOrbit

public int getPrevMaxOrbit()
Get the maximum orbit number in the range preceding this one

Returns:
next maximum orbit number

getNextMinCycle

public int getNextMinCycle()
Get the minimum cycle number in the range following this one

Returns:
next minimum cycle number

getNextMaxCycle

public int getNextMaxCycle()
Get the maximum cycle number in the range following this one

Returns:
next maximum cycle number

getPrevMinCycle

public int getPrevMinCycle()
Get the minimum cycle number in the range preceding this one

Returns:
next minimum cycle number

getPrevMaxCycle

public int getPrevMaxCycle()
Get the maximum cycle number in the range preceding this one

Returns:
next maximum cycle number

getMinDate

public String getMinDate()
Description copied from class: TimeRangeForm
Get the start date, or null if no min date has been input

Overrides:
getMinDate in class TimeRangeForm
Returns:
start date as string, or null

getMaxDate

public String getMaxDate()
Description copied from class: TimeRangeForm
Get the max date, or null if no max date has been input

Overrides:
getMaxDate in class TimeRangeForm
Returns:
end date as string, or null

checkArray

protected <T> void checkArray(T t,
                              T[] array,
                              String key,
                              org.apache.struts.action.ActionErrors errors,
                              String msg)
Check that an item is in an array, which may be unsorted. If not found, add an ActionMessage to the ActionErrors.

Type Parameters:
T - Type of item
Parameters:
t - item
array - The array
key - Message key
errors - Array of errors
msg - Message for user

HiRISE

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