HiRISE

HiRISE.HiReport.form
Class SearchForm

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
                  extended by HiRISE.HiReport.form.SearchForm
All Implemented Interfaces:
Serializable

public class SearchForm
extends OrbitCycleForm

Quick search form

See Also:
Serialized Form

Nested Class Summary
static class SearchForm.SearchType
          Types of searches available
 
Nested classes/interfaces inherited from class HiRISE.HiReport.form.OrbitCycleForm
OrbitCycleForm.RangeUnit
 
Field Summary
 
Fields inherited from class HiRISE.HiReport.form.OrbitCycleForm
by, cenLat, cenLon, maxCycle, maxLat, maxLon, maxLs, maxMy, maxOrbit, minCycle, minLat, minLon, minLs, minMy, minOrbit, range, season, target
 
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
SearchForm()
           
 
Method Summary
 String getDescription()
          Get the description input
 String getInput()
          Get the search term
 String getObservation()
          Get the observation input
static String getPhase(int orbit)
          Find an appropriate phase for a given orbit number.
 SearchForm.SearchType getSearchType()
          Return the type of search to be performed
 int getSuggestion()
          Get the suggestion input
 void setInput(String input)
          Set the search term
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map, javax.servlet.http.HttpServletRequest req)
          Validation is used to parse the input, determine what type of search is being asked for, and set the appropriate inputs in the base class.
 
Methods inherited from class HiRISE.HiReport.form.OrbitCycleForm
checkArray, getBy, getCenLat, getCenLon, getMartianSeason, getMaxCycle, getMaxDate, getMaxLat, getMaxLon, getMaxLs, getMaxMy, getMaxOrbit, getMinCycle, getMinDate, getMinLat, getMinLon, getMinLs, getMinMy, getMinOrbit, getNextMaxCycle, getNextMaxOrbit, getNextMinCycle, getNextMinOrbit, getPrevMaxCycle, getPrevMaxOrbit, getPrevMinCycle, getPrevMinOrbit, getRange, getSeason, getSeasons, getTarget, isMartian, setBy, setCenLat, setCenLon, setMaxCycle, setMaxLat, setMaxLon, setMaxLs, setMaxMy, setMaxOrbit, setMinCycle, setMinLat, setMinLon, setMinLs, setMinMy, setMinOrbit, setRange, setSeason, setTarget
 
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
 

Constructor Detail

SearchForm

public SearchForm()
Method Detail

getObservation

public String getObservation()
Get the observation input

Returns:
observation ID input

getSuggestion

public int getSuggestion()
Get the suggestion input

Returns:
suggestion ID input (zero for none)

getDescription

public String getDescription()
Get the description input

Returns:
description text

setInput

public void setInput(String input)
Set the search term

Parameters:
input - the search term

getInput

public String getInput()
Get the search term

Returns:
search term

getSearchType

public SearchForm.SearchType getSearchType()
Return the type of search to be performed

Returns:
The search type

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map,
                                                      javax.servlet.http.HttpServletRequest req)
Validation is used to parse the input, determine what type of search is being asked for, and set the appropriate inputs in the base class.

Overrides:
validate in class OrbitCycleForm

getPhase

public static String getPhase(int orbit)
Find an appropriate phase for a given orbit number. If zero, the phase will be CRU (cruise). This relies on libHiRISE Observation_ID being updated for each phase entered.

Parameters:
orbit - The orbit number
Returns:
Phase abbreviation

HiRISE

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