F - Subclass for search handlingpublic abstract class AdvancedSearch<F extends OrbitCycleForm> extends DataProvider
| Modifier and Type | Field and Description |
|---|---|
protected java.text.SimpleDateFormat |
doy
Format time as year-DOY
|
static java.lang.String |
ID
CVS ID
|
protected static java.util.logging.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 java.lang.String |
sql
Our SQL string
|
protected NamedXYSeriesCollection |
xydataset
Dataset for plot
|
| Constructor and Description |
|---|
AdvancedSearch() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSQL()
Get the query
|
org.jfree.data.xy.XYSeriesCollection |
getXYDataset()
Get the plot dataset
|
abstract ResultList |
search(F form)
Subclasses override this to perform specific types of searches
|
static void |
setOrbitsFromCycles(java.sql.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(java.sql.Connection conn,
OrbitCycleForm form)
Convert input of Mars years into time range, setting the appropriate form values.
|
static void |
setTimeRangeFromOrbits(java.sql.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.
|
getConnection, setConnectionpublic static final java.lang.String ID
protected static final float MARS_RADIUS_KM
protected static final java.util.logging.Logger logger
protected java.text.SimpleDateFormat doy
protected java.lang.String sql
protected boolean showUnproferred
protected boolean plot
protected NamedXYSeriesCollection xydataset
protected boolean privileged
public void setPlot(boolean plot)
plot - true if plot creation is requestedpublic void setPrivileged(boolean privileged)
privileged - true if privilegedpublic void setShowUnproferred(boolean showUnproferred)
showUnproferred - True if unreleased observations should be includedpublic boolean willShowUnproferred()
public static void setOrbitsFromCycles(java.sql.Connection conn,
OrbitCycleForm form)
throws java.sql.SQLException
conn - open database connectionform - the inputjava.sql.SQLException - query on Cycles failedpublic abstract ResultList search(F form) throws java.sql.SQLException, java.text.ParseException
form - inputjava.sql.SQLExceptionjava.text.ParseExceptionpublic static void setTimeRangeFromMarsYears(java.sql.Connection conn,
OrbitCycleForm form)
throws java.sql.SQLException
conn - open database connectionform - the inputjava.sql.SQLException - query on Mars_Year failedpublic static void setTimeRangeFromOrbits(java.sql.Connection conn,
OrbitCycleForm form)
throws java.sql.SQLException
conn - open database connectionform - the inputjava.sql.SQLException - query on Orbits failedpublic org.jfree.data.xy.XYSeriesCollection getXYDataset()
public java.lang.String getSQL()
Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona