HiRISE

HiRISE.HiReport.main
Class AdvancedSearch<F extends OrbitCycleForm>

java.lang.Object
  extended by HiRISE.HiReport.DataProvider
      extended by HiRISE.HiReport.main.AdvancedSearch<F>
Type Parameters:
F - Subclass for search handling
Direct Known Subclasses:
CtxSearch, ObservationSearch, SuggestionSearch

public abstract class AdvancedSearch<F extends OrbitCycleForm>
extends DataProvider

Base class for advanced search.


Field Summary
protected  SimpleDateFormat doy
          Format time as year-DOY
static String ID
          CVS ID
protected static Logger logger
          Our logger
protected static float MARS_RADIUS_KM
          Radius of Mars in KM
protected  boolean plot
          If true, plot will be created
protected  boolean privileged
          Protection if needed (default = unprivileged)
protected  boolean showUnproferred
          If true, show unreleased observations
protected  String sql
          Our SQL string
protected  NamedXYSeriesCollection xydataset
          Dataset for plot
 
Fields inherited from class HiRISE.HiReport.DataProvider
Anaglyph, CCD, Cycles, DTM, EDR, FS, Geo, HiP, HiRISE_ROOT, Jit, Mars_Years, Obs, Orbits, PAP, PDTM, PEDR, PHiP, PPL, PPL_map, PRDR, PS, PXP, RDR, RS1, RS2, SO, SOP, SOPO, SOPO_map, SOST, SOST_map, SR, ST, Tags, Web, XP
 
Constructor Summary
AdvancedSearch()
           
 
Method Summary
 String getSQL()
          Get the query
 XYSeriesCollection getXYDataset()
          Get the plot dataset
abstract  ResultList search(F form)
          Subclasses override this to perform specific types of searches
static void setOrbitsFromCycles(Connection conn, OrbitCycleForm form)
          Convert input of cycle IDs into orbit numbers, setting the appropriate form values.
 void setPlot(boolean plot)
          If true, plot will be created during search
 void setPrivileged(boolean privileged)
          Set the value of privileged
 void setShowUnproferred(boolean showUnproferred)
          Set to false to not include unreleased observations.
static void setTimeRangeFromMarsYears(Connection conn, OrbitCycleForm form)
          Convert input of Mars years into time range, setting the appropriate form values.
static void setTimeRangeFromOrbits(Connection conn, OrbitCycleForm form)
          Convert input of orbit numbers into time range, setting the appropriate form values.
 boolean willShowUnproferred()
          If true, unreleased observations will be returned.
 
Methods inherited from class HiRISE.HiReport.DataProvider
getConnection, setConnection
 
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

MARS_RADIUS_KM

protected static final float MARS_RADIUS_KM
Radius of Mars in KM

See Also:
Constant Field Values

logger

protected static final Logger logger
Our logger


doy

protected SimpleDateFormat doy
Format time as year-DOY


sql

protected String sql
Our SQL string


showUnproferred

protected boolean showUnproferred
If true, show unreleased observations


plot

protected boolean plot
If true, plot will be created


xydataset

protected NamedXYSeriesCollection xydataset
Dataset for plot


privileged

protected boolean privileged
Protection if needed (default = unprivileged)

Constructor Detail

AdvancedSearch

public AdvancedSearch()
Method Detail

setPlot

public void setPlot(boolean plot)
If true, plot will be created during search

Parameters:
plot - true if plot creation is requested

setPrivileged

public void setPrivileged(boolean privileged)
Set the value of privileged

Parameters:
privileged - true if privileged

setShowUnproferred

public void setShowUnproferred(boolean showUnproferred)
Set to false to not include unreleased observations.

Parameters:
showUnproferred - True if unreleased observations should be included

willShowUnproferred

public boolean willShowUnproferred()
If true, unreleased observations will be returned.

Returns:
true if unreleased included

setOrbitsFromCycles

public static void setOrbitsFromCycles(Connection conn,
                                       OrbitCycleForm form)
                                throws SQLException
Convert input of cycle IDs into orbit numbers, setting the appropriate form values.

Parameters:
conn - open database connection
form - the input
Throws:
SQLException - query on Cycles failed

search

public abstract ResultList search(F form)
                           throws SQLException,
                                  ParseException
Subclasses override this to perform specific types of searches

Parameters:
form - input
Returns:
output
Throws:
SQLException
ParseException

setTimeRangeFromMarsYears

public static void setTimeRangeFromMarsYears(Connection conn,
                                             OrbitCycleForm form)
                                      throws SQLException
Convert input of Mars years into time range, setting the appropriate form values.

Parameters:
conn - open database connection
form - the input
Throws:
SQLException - query on Mars_Year failed

setTimeRangeFromOrbits

public static void setTimeRangeFromOrbits(Connection conn,
                                          OrbitCycleForm form)
                                   throws SQLException
Convert input of orbit numbers into time range, setting the appropriate form values.

Parameters:
conn - open database connection
form - the input
Throws:
SQLException - query on Orbits failed

getXYDataset

public XYSeriesCollection getXYDataset()
Get the plot dataset

Returns:
plot data collected in getSuggestions or getObservations methods

getSQL

public String getSQL()
Get the query

Returns:
SQL

HiRISE

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