HiRISE

HiRISE.HiReport.form
Class AdvancedSearchForm

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.AdvancedSearchForm
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SearchForm, SuggestionListForm

public class AdvancedSearchForm
extends OrbitCycleForm

Form for observation-based listings. This captures any and all information pertaining to a query that could return zero or more observations. It internally has a TimeRangeModel. Upon validation, this will be updated to contain the min and max time for the query.

See Also:
Serialized Form

Field Summary
protected  boolean active
          If true, include the not retired
protected  String by
          Do search by distance in km or degrees?
protected  boolean cap
          If true, include captioned observations
protected  float cenLat
          Center latitude ('ocentric)
protected  float cenLon
          Center longitude (east)
protected  String description
          description or comment text
protected  boolean highStability
          If true, include high stability
static String ID
          CVS 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  float minLat
          Minimum latitude ('ocentric)
protected  float minLon
          Minimum longitude (east)
protected  float minLs
          Minimum solar longitude
protected  int minMy
          Minimum Mars year
protected  boolean nadir
          If true, include roll angle == 0
protected  boolean nocap
          If true, include uncaptioned observations
protected  boolean nonstereo
          If true, include non-stereo
protected  boolean nopub
          If true, include unreleased observations
protected  boolean normStability
          If true, include norm stability
protected  String observation
          observation pattern, may or may not be full observation ID
protected  boolean offnadir
          If true, include roll angle != 0
protected  String[] phase
          Mission phases
static String[] PHASES
          Options array for mission phases
protected  String planner
          Name of planner
protected  String[] product
          Product (has) values
protected  boolean pub
          If true, include publicly released observations
protected  float range
          Range from center (degrees)
protected  boolean retired
          If true, include retired
protected  boolean sc
          If true, search comment
protected  boolean sd
          If true, search description
protected  String season
          season name, corresponding to one of the keys in the seasons map
protected static Map<String,int[]> seasons
          Maps range choices to Calendar unit fields
protected  boolean sn
          If true, search notes
protected  boolean sp
          If true, search planner's note
protected  boolean sr
          If true, search science rationale
protected  boolean ss
          If true, search stl_description
protected  String[] status
          Status values
static String[] STATUSES
          Options array for status values
protected  boolean stereo
          If true, include stereo
protected  String suggester
          User name from People table
protected  int suggestion
          Suggestion id
protected  String[] tag
          Tag values
protected  String tagger
          Tagger username
protected  String[] target
          Target array
static String[] TARGETS
          Options array for target names
protected  String[] theme
          science theme array
static String[] THEMES
          Options array for science themes
protected  String username
          User name of the suggester
protected  boolean word
          If true, do a whole-word search
 
Fields inherited from class HiRISE.HiReport.form.OrbitCycleForm
maxCycle, maxOrbit, minCycle, minOrbit
 
Fields inherited from class HiRISE.HiReport.form.TimeRangeForm
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
AdvancedSearchForm()
           
 
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.
 boolean getActive()
           
 String getBy()
          Get the value of by (units of range, either km or deg)
 boolean getCap()
          Returns true if captioned observations will be included, false if excluded
 float getCenLat()
           
 float getCenLon()
           
 String getDescription()
          Get the description being searched on
 boolean getHighStability()
           
 String getMaxDate()
          Get the max date, or null if no max date has been input
 float getMaxLat()
           
 float getMaxLon()
           
 float getMaxLs()
          Get the maximum solar longitude
 int getMaxMy()
          Get the maximum Mars year
 String getMinDate()
          Get the start date, or null if no min date has been input
 float getMinLat()
           
 float getMinLon()
           
 float getMinLs()
          Get the minimum solar longitude
 int getMinMy()
          Get the minimum Mars year
 boolean getNadir()
           
 boolean getNocap()
          Returns true if non-captioned observations will be included, false if excluded
 boolean getNonstereo()
           
 boolean getNopub()
          Returns true if non-public observations will be included, false if excluded
 boolean getNormStability()
           
 String getObservation()
           
 boolean getOffnadir()
           
 String[] getPhase()
          Get the mission phase names
 String[] getPhases()
          Get the array of possible (abbreviated) mission phase names.
 String getPlanner()
          Get the planner name
 String[] getProduct()
          Get the product names
 boolean getPub()
          Returns true if public observations will be included, false if excluded
 float getRange()
           
 boolean getRetired()
           
 boolean getSc()
           
 boolean getSd()
           
 String getSeason()
           
 String[] getSeasons()
          Get the array of possible season names.
 boolean getSn()
           
 boolean getSp()
           
 boolean getSr()
           
 boolean getSs()
           
 String[] getStatus()
          Get the status values
 String[] getStatuses()
          Get the array of possible status values.
 boolean getStereo()
           
 String getSuggester()
           
 int getSuggestion()
           
 String[] getTag()
          Get the tag names
 String getTagger()
           
 String[] getTarget()
          Get the target names
 String[] getTargets()
          Get the array of possible target names.
 String[] getTheme()
          Get the science theme.
 String[] getThemes()
          Get the array of possible science themes.
 String getUsername()
           
 boolean getWord()
           
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest req)
          Reset parameters
 void setActive(boolean active)
           
 void setBy(String by)
          Set the value of by (units of range, either km or deg)
 void setCap(boolean cap)
          Set to true to include captioned observations, false to exclude non-captioned observations
 void setCenLat(float cenLat)
           
 void setCenLon(float cenLon)
           
 void setDescription(String description)
          Set the description being searched on
 void setHighStability(boolean highStability)
           
 void setMaxLat(float maxLat)
           
 void setMaxLon(float maxLon)
           
 void setMaxLs(float maxLs)
          Set the maximum solar longitude
 void setMaxMy(int maxMy)
          Set the maximum Mars year
 void setMinLat(float minLat)
           
 void setMinLon(float minLon)
           
 void setMinLs(float minLs)
          Set the minimum solar longitude
 void setMinMy(int minMy)
          Set the minimum Mars year
 void setNadir(boolean nadir)
           
 void setNocap(boolean nocap)
          Set to true to include non-captioned observations, false to exclude non-captioned observations
 void setNonstereo(boolean nonstereo)
           
 void setNopub(boolean nopub)
          Set to true to include non-public observations, false to exclude non-public observations
 void setNormStability(boolean normStability)
           
 void setObservation(String observation)
           
 void setOffnadir(boolean offnadir)
           
 void setPhase(String... phase)
          Set the mission phase names
 void setPlanner(String planner)
          Set the planner name
 void setProduct(String... product)
          Set products
 void setPub(boolean pub)
          Set to true to include public observations, false to exclude non-public observations
 void setRange(float range)
           
 void setRetired(boolean retired)
           
 void setSc(boolean sc)
           
 void setSd(boolean sd)
           
 void setSeason(String season)
           
 void setSn(boolean sn)
           
 void setSp(boolean sp)
           
 void setSr(boolean sr)
           
 void setSs(boolean ss)
           
 void setStatus(String... status)
          Set the status values
 void setStereo(boolean stereo)
           
 void setSuggester(String suggester)
           
 void setSuggestion(int suggestion)
           
 void setTag(String... tag)
          Set tag names
 void setTagger(String tagger)
           
 void setTarget(String... target)
          Set the target names
 void setTheme(String... theme)
          Set the science theme
 void setUsername(String username)
           
 void setWord(boolean word)
           
 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.OrbitCycleForm
getMaxCycle, getMaxOrbit, getMinCycle, getMinOrbit, getNextMaxCycle, getNextMaxOrbit, getNextMinCycle, getNextMinOrbit, getPrevMaxCycle, getPrevMaxOrbit, getPrevMinCycle, getPrevMinOrbit, setMaxCycle, setMaxOrbit, setMinCycle, setMinOrbit
 
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, 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

ID

public static final String ID
CVS ID

See Also:
Constant Field Values

PHASES

public static final String[] PHASES
Options array for mission phases


TARGETS

public static String[] TARGETS
Options array for target names


STATUSES

public static final String[] STATUSES
Options array for status values


THEMES

public static final String[] THEMES
Options array for science themes


seasons

protected static Map<String,int[]> seasons
Maps range choices to Calendar unit fields


phase

protected String[] phase
Mission phases


status

protected String[] status
Status values


product

protected String[] product
Product (has) values


tag

protected String[] tag
Tag values


tagger

protected String tagger
Tagger username


target

protected String[] target
Target array


description

protected String description
description or comment text


theme

protected String[] theme
science theme array


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


suggestion

protected int suggestion
Suggestion 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)


planner

protected String planner
Name of planner


season

protected String season
season name, corresponding to one of the keys in the seasons map


observation

protected String observation
observation pattern, may or may not be full observation ID


highStability

protected boolean highStability
If true, include high stability


normStability

protected boolean normStability
If true, include norm stability


stereo

protected boolean stereo
If true, include stereo


nonstereo

protected boolean nonstereo
If true, include non-stereo


nadir

protected boolean nadir
If true, include roll angle == 0


offnadir

protected boolean offnadir
If true, include roll angle != 0


sc

protected boolean sc
If true, search comment


sd

protected boolean sd
If true, search description


ss

protected boolean ss
If true, search stl_description


sr

protected boolean sr
If true, search science rationale


sn

protected boolean sn
If true, search notes


sp

protected boolean sp
If true, search planner's note


suggester

protected String suggester
User name from People table


username

protected String username
User name of the suggester


retired

protected boolean retired
If true, include retired


active

protected boolean active
If true, include the not retired


word

protected boolean word
If true, do a whole-word search


by

protected String by
Do search by distance in km or degrees?


pub

protected boolean pub
If true, include publicly released observations


nopub

protected boolean nopub
If true, include unreleased observations


cap

protected boolean cap
If true, include captioned observations


nocap

protected boolean nocap
If true, include uncaptioned observations

Constructor Detail

AdvancedSearchForm

public AdvancedSearchForm()
Method Detail

getPhases

public String[] getPhases()
Get the array of possible (abbreviated) mission phase names.

Returns:
phase names

getTargets

public String[] getTargets()
Get the array of possible target names.

Returns:
target names

getThemes

public String[] getThemes()
Get the array of possible science themes.

Returns:
science themes

getSeasons

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

Returns:
season names

getStatuses

public String[] getStatuses()
Get the array of possible status values.

Returns:
status values

getPlanner

public String getPlanner()
Get the planner name

Returns:
planner name

setPlanner

public void setPlanner(String planner)
Set the planner name

Parameters:
planner - name of planner

getBy

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

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

getDescription

public String getDescription()
Get the description being searched on

Returns:
description text

setDescription

public void setDescription(String description)
Set the description being searched on

Parameters:
description - text

setPhase

public void setPhase(String... phase)
Set the mission phase names

Parameters:
phase - mission phases

setTarget

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

Parameters:
target - name of targets

setProduct

public void setProduct(String... product)
Set products

Parameters:
product - product IDs

setTag

public void setTag(String... tag)
Set tag names

Parameters:
tag - Tag names

setStatus

public void setStatus(String... status)
Set the status values

Parameters:
status - values for status

getPhase

public String[] getPhase()
Get the mission phase names

Returns:
phase names

getTarget

public String[] getTarget()
Get the target names

Returns:
target names

getStatus

public String[] getStatus()
Get the status values

Returns:
status values

getTag

public String[] getTag()
Get the tag names

Returns:
tag names

getProduct

public String[] getProduct()
Get the product names

Returns:
product names

getTheme

public String[] getTheme()
Get the science theme.

Returns:
science theme

setTheme

public void setTheme(String... theme)
Set the science theme

Parameters:
theme - theme

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()

getMaxLat

public float getMaxLat()

setMinLat

public void setMinLat(float minLat)

setMaxLat

public void setMaxLat(float maxLat)

getMinLon

public float getMinLon()

getMaxLon

public float getMaxLon()

setMinLon

public void setMinLon(float minLon)

setMaxLon

public void setMaxLon(float maxLon)

getCenLat

public float getCenLat()

getCenLon

public float getCenLon()

setCenLat

public void setCenLat(float cenLat)

setCenLon

public void setCenLon(float cenLon)

getRange

public float getRange()

setRange

public void setRange(float range)

getSuggestion

public int getSuggestion()

setSuggestion

public void setSuggestion(int suggestion)

setSeason

public void setSeason(String season)

getSeason

public String getSeason()

getObservation

public String getObservation()

setObservation

public void setObservation(String observation)

getHighStability

public boolean getHighStability()

setHighStability

public void setHighStability(boolean highStability)

getNormStability

public boolean getNormStability()

setNormStability

public void setNormStability(boolean normStability)

getStereo

public boolean getStereo()

setStereo

public void setStereo(boolean stereo)

getNonstereo

public boolean getNonstereo()

setNonstereo

public void setNonstereo(boolean nonstereo)

getNadir

public boolean getNadir()

setNadir

public void setNadir(boolean nadir)

getOffnadir

public boolean getOffnadir()

setOffnadir

public void setOffnadir(boolean offnadir)

setSc

public void setSc(boolean sc)

setSd

public void setSd(boolean sd)

setSs

public void setSs(boolean ss)

setSr

public void setSr(boolean sr)

setSn

public void setSn(boolean sn)

setSp

public void setSp(boolean sp)

getSc

public boolean getSc()

getSd

public boolean getSd()

getSs

public boolean getSs()

getSr

public boolean getSr()

getSn

public boolean getSn()

getSp

public boolean getSp()

getSuggester

public String getSuggester()

setSuggester

public void setSuggester(String suggester)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getTagger

public String getTagger()

setTagger

public void setTagger(String tagger)

getActive

public boolean getActive()

setActive

public void setActive(boolean active)

getRetired

public boolean getRetired()

setRetired

public void setRetired(boolean retired)

getWord

public boolean getWord()

setWord

public void setWord(boolean word)

getPub

public boolean getPub()
Returns true if public observations will be included, false if excluded

Returns:
true = include public, false = exclude

setPub

public void setPub(boolean pub)
Set to true to include public observations, false to exclude non-public observations

Parameters:
pub - true = include public, false = exclude

getNopub

public boolean getNopub()
Returns true if non-public observations will be included, false if excluded

Returns:
true = include non-public, false = exclude

setNopub

public void setNopub(boolean nopub)
Set to true to include non-public observations, false to exclude non-public observations

Parameters:
nopub - true = include non-public, false = exclude

getCap

public boolean getCap()
Returns true if captioned observations will be included, false if excluded

Returns:
true = include captioned, false = exclude

setCap

public void setCap(boolean cap)
Set to true to include captioned observations, false to exclude non-captioned observations

Parameters:
cap - true = include captioned, false = exclude

getNocap

public boolean getNocap()
Returns true if non-captioned observations will be included, false if excluded

Returns:
true = include non-captioned, false = exclude

setNocap

public void setNocap(boolean nocap)
Set to true to include non-captioned observations, false to exclude non-captioned observations

Parameters:
nocap - true = include non-captioned, false = exclude

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

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest req)
Description copied from class: PageSortForm
Reset parameters

Overrides:
reset in class PageSortForm

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 OrbitCycleForm

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