public abstract class TargetList extends java.lang.Object implements SearchInterface, javax.swing.event.ListSelectionListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener, java.awt.event.ItemListener
SearchInterface
. New target lists should subclass this
class and implement the remaining search interface methods. Subclasses are
effectively data models for the SearchComponent
SearchInterface
,
SearchComponent
Modifier and Type | Class and Description |
---|---|
static class |
TargetList.ColumnComparatorSettings
Defines the list of columns and the comparators to use for them.
|
static class |
TargetList.ConfigurationParameter |
static class |
TargetList.ListTypes
An enumerated list of the different target lists and their associated
precedence values.
|
static class |
TargetList.OrderingFields
This enumeration defines the default ordering configuration
for the search queries.
|
static class |
TargetList.TableAliases
An enumeration defining the tables and their alases that are to be used in
the target search queries, the tables that are actually included will depend
on the type of target list being generated.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEBUG_EVENTS_PROPERTY |
static java.lang.String |
DEBUG_INIT_PROPERTY |
static java.lang.String |
DEBUG_LSUBS_FILTER_PROPERTY |
static java.lang.String |
DEBUG_NEARBY_LIST_PROPERTY |
static java.lang.String |
DEBUG_PRIORITIES_PROPERT |
static java.lang.String |
DEBUG_QUERY_PROPERTY |
static java.lang.String |
DEBUG_RED9_SHIFTS_PROPERTY |
static java.lang.String |
DEBUG_SEASONAL_PROPERTY |
static java.lang.String |
DEFAULT_CONFIGURATION_FILE
Default configuration file
|
static double |
DEFAULT_MAXIMUM_LATITUDE |
static double |
DEFAULT_MAXIMUM_LONGITUDE |
static double |
DEFAULT_MAXIMUM_LSUBS |
static double |
DEFAULT_MINIMUM_LATITUDE |
static double |
DEFAULT_MINIMUM_LONGITUDE |
static double |
DEFAULT_MINIMUM_LSUBS |
static int |
DEFAULT_ROW_LIMIT |
static java.lang.String |
ID
Class identifier
|
IGNORE_FILTER_UPDATES_NAME, MAX_LATITUDE_FIELDNAME, MAX_LONG_FIELDNAME, MAX_LSUBS_FIELDNAME, MIN_LATITUDE_FIELDNAME, MIN_LONG_FIELDNAME, MIN_LSUBS_FIELDNAME, PRIORITY_LISTNAME, ROW_LIMIT_ENABLENAME, ROW_LIMIT_FIELDNAME, SCIENCE_THEME_LISTNAME, SPECIAL_TARGETS_ADDED_PROPERTY, SPECIAL_TARGETS_REMOVED_PROPERTY, THEME_COUNT_FIELDNAME
Constructor and Description |
---|
TargetList() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Vector<java.lang.Integer> |
addedSuggestionsNotFound()
If any of the suggestions ID's found in the list passed to the
SearchInterface.addSuggestions(Vector) were not found, they will be in the Vector
of Integers returned by this method. |
protected java.util.Vector<java.util.Vector<java.lang.String>> |
addNearbyObservationsColumn(java.util.Vector<java.util.Vector<java.lang.String>> data_table) |
protected java.util.Vector<java.util.Vector<java.lang.String>> |
addSeasonalColumn(java.util.Vector<java.util.Vector<java.lang.String>> data_table) |
void |
addSuggestions(java.util.Vector<java.lang.Integer> add_list)
A list of suggestions that should be included in the list.
|
protected java.util.Vector<java.util.Vector<java.lang.String>> |
applyScienceThemeCountRestrictions(java.util.Vector<java.util.Vector<java.lang.String>> data_table) |
abstract java.lang.String |
constructSearchQuery()
Constructs the base search query specific to the list being generated.
|
abstract java.lang.String |
constructSecondaryQuery()
Constructs the secondary query that will query for special target
requests to add to the search list.
|
void |
enableRowLimits(boolean enable_row_limits)
Enable or disable row limits.
|
abstract java.util.Vector<java.util.Vector<java.lang.String>> |
executeSearch()
A method executing a database search for suggested targets, and will
usually execure the query returned by the
SearchInterface.constructSearchQuery()
method. |
java.util.Vector<java.lang.String> |
exportSelectedPriorites() |
protected java.util.Vector<java.lang.Integer> |
findMissingSuggestions(java.util.Vector<java.util.Vector<java.lang.String>> data_table) |
java.util.Vector<java.lang.Integer> |
getAddedSuggestions()
Returns the list of specially added suggestions.
|
protected java.lang.String |
getAddedSuggestionsSQL(java.lang.String suggestion_table_alias) |
java.util.Vector<java.lang.String> |
getColumnNames() |
protected java.lang.String |
getColumnOrderingSQL() |
protected java.lang.String |
getCoordinateRestrictionsSQL(java.lang.String first_suggestion_table_alias,
java.lang.String min_lon_column_name,
java.lang.String max_lon_column_name) |
protected PIRL.Database.Database |
getDatabase(PIRL.Configuration.Configuration config) |
protected java.lang.String |
getLsubSRestrictionsSQL(java.lang.String first_suggestion_table_alias,
java.lang.String min_lsubs_column_name,
java.lang.String max_lsubs_column_name) |
double |
getMaximumLatitude()
Get the current setting of the maximum latitude
|
double |
getMaximumLongitude()
Get the current maximum longitude setting.
|
double |
getMaximumLs()
Get the current maximum solar longitude setting.
|
double |
getMinimumLatitude()
Get the current minimum latitude setting.
|
double |
getMinimumLongitude()
Get the current minimum longitude setting
|
double |
getMinimumLs()
Get the current minimum solar longitude setting.
|
java.util.HashMap<java.lang.Integer,TargetWarning> |
getMissingSuggestionWarnings()
Get the set of warnings generated for each missing suggestion.
|
protected java.lang.String |
getPrioritySQL(java.lang.String priority_alias) |
boolean |
getRetrieveNearestNeighborList()
Indicates if the nearest neighbor list should be generated.
|
int |
getRowLimit()
Get the current row limit setting.
|
java.util.Vector<java.lang.String> |
getScienceThemesList() |
protected java.lang.String |
getScienceThemesRestricionsSQL(java.lang.String primary_theme_table_alias) |
protected java.util.Vector<java.lang.String> |
getSeasonalData(int suggestion_id)
Retrieves the seasonal information for the specified suggestion id.
|
java.util.Vector<PriorityList> |
getSelectedPriorities()
The list of priorities currently selected for the list.
|
java.util.Vector<java.lang.String> |
getSelectedScienceThemes()
Get the list of science themes currently selected for the list.
|
protected java.util.Vector<java.util.Vector<java.lang.String>> |
getSuggestionData(int suggestion_id) |
int |
getSuggestionsPerThemeLimit()
Get the current suggestions per theme limit
|
boolean |
hasRowLimitsEnabled()
Indicates if row limits have been enabled.
|
protected void |
initializeScienceThemesList(PIRL.Configuration.Configuration config) |
void |
initOrderingSettings(PIRL.Configuration.Configuration config)
The column ordering controls are expected to be set for the entire
session based on the hard-coded defaults, or by reading the
settings from a configuration.
|
protected void |
initPriorities() |
protected boolean |
isInList(java.lang.String suggestion_id,
java.util.Vector<java.util.Vector<java.lang.String>> list) |
void |
itemStateChanged(java.awt.event.ItemEvent event) |
abstract TargetList.ListTypes |
precedence()
The precedence value for the list.
|
protected void |
prepareDbQueries() |
void |
propertyChange(java.beans.PropertyChangeEvent event) |
void |
setColumnNames(java.util.Vector<java.lang.String> columnNames) |
protected void |
setConfiguration(PIRL.Configuration.Configuration config) |
protected void |
setListType(TargetList.ListTypes type) |
void |
setMaximumLatitude(double max_latitude)
Sets the maximum latitude of the search region.
|
void |
setMaximumLongitude(double max_longitude)
Sets the maximum longitude of the search region for which targets will
be searched for in the search query.
|
void |
setMaximumLs(double maxLs)
Sets the maximum solar longitude that targets must overlap or be less than
to be included in the list.
|
void |
setMinimumLatitude(double min_latitude)
Sets the minimum latitude of the search region for which targets will
be searched for in the search query.
|
void |
setMinimumLongitude(double min_longitude)
Sets the minimum longitude of the search region for which targets will
be searched for in the search query.
|
void |
setMinimumLs(double minLs)
Sets the minimum solar longitude that targets must overlap to be included
in the list.
|
void |
setPriorities(java.util.Vector<PriorityList> priorities)
The list of priorities to be included in the list.
|
void |
setRetrieveNearestNeighborList(boolean include_nearest)
Setting to optionally include the nearest neighbor list.
|
void |
setRowLimit(int row_limit)
Set the maximum number of records (targets) to retrieve from the database.
|
void |
setScienceThemes(java.util.Vector<java.lang.String> theme_list)
Sets the science themes to be included in the search.
|
void |
setSuggestionsPerThemeLimit(int suggestions_per_theme)
Sets the maximum number of suggestions per science theme that can
appear in the list.
|
void |
setTabConfig(PIRL.Configuration.Configuration config)
Looks for any search parameters found and the configuration and will
use these to set the parameters for the TargetList.
|
void |
stateChanged(javax.swing.event.ChangeEvent event) |
void |
valueChanged(javax.swing.event.ListSelectionEvent event) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeAddedSuggestionsSearch, updateAddedSuggestions
public static final java.lang.String ID
public static final java.lang.String DEFAULT_CONFIGURATION_FILE
public static final double DEFAULT_MINIMUM_LONGITUDE
public static final double DEFAULT_MAXIMUM_LONGITUDE
public static final double DEFAULT_MINIMUM_LATITUDE
public static final double DEFAULT_MAXIMUM_LATITUDE
public static final double DEFAULT_MINIMUM_LSUBS
public static final double DEFAULT_MAXIMUM_LSUBS
public static final int DEFAULT_ROW_LIMIT
public static final java.lang.String DEBUG_INIT_PROPERTY
public static final java.lang.String DEBUG_QUERY_PROPERTY
public static final java.lang.String DEBUG_SEASONAL_PROPERTY
public static final java.lang.String DEBUG_PRIORITIES_PROPERT
public static final java.lang.String DEBUG_NEARBY_LIST_PROPERTY
public static final java.lang.String DEBUG_EVENTS_PROPERTY
public static final java.lang.String DEBUG_LSUBS_FILTER_PROPERTY
public static final java.lang.String DEBUG_RED9_SHIFTS_PROPERTY
protected void setConfiguration(PIRL.Configuration.Configuration config)
protected void setListType(TargetList.ListTypes type)
protected void initPriorities()
protected PIRL.Database.Database getDatabase(PIRL.Configuration.Configuration config) throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception
PIRL.Database.Database_Exception
PIRL.Configuration.Configuration_Exception
protected void prepareDbQueries() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
protected void initializeScienceThemesList(PIRL.Configuration.Configuration config) throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception
PIRL.Database.Database_Exception
PIRL.Configuration.Configuration_Exception
protected java.lang.String getPrioritySQL(java.lang.String priority_alias)
protected java.lang.String getCoordinateRestrictionsSQL(java.lang.String first_suggestion_table_alias, java.lang.String min_lon_column_name, java.lang.String max_lon_column_name)
protected java.lang.String getLsubSRestrictionsSQL(java.lang.String first_suggestion_table_alias, java.lang.String min_lsubs_column_name, java.lang.String max_lsubs_column_name)
protected java.lang.String getScienceThemesRestricionsSQL(java.lang.String primary_theme_table_alias)
protected java.lang.String getAddedSuggestionsSQL(java.lang.String suggestion_table_alias)
protected java.util.Vector<java.lang.Integer> findMissingSuggestions(java.util.Vector<java.util.Vector<java.lang.String>> data_table) throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
protected java.util.Vector<java.lang.String> getSeasonalData(int suggestion_id) throws PIRL.Database.Database_Exception
suggestion_id
- PIRL.Database.Database_Exception
protected java.util.Vector<java.util.Vector<java.lang.String>> addSeasonalColumn(java.util.Vector<java.util.Vector<java.lang.String>> data_table) throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
protected java.util.Vector<java.util.Vector<java.lang.String>> addNearbyObservationsColumn(java.util.Vector<java.util.Vector<java.lang.String>> data_table) throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
protected java.util.Vector<java.util.Vector<java.lang.String>> applyScienceThemeCountRestrictions(java.util.Vector<java.util.Vector<java.lang.String>> data_table)
protected java.util.Vector<java.util.Vector<java.lang.String>> getSuggestionData(int suggestion_id) throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
protected java.lang.String getColumnOrderingSQL()
protected boolean isInList(java.lang.String suggestion_id, java.util.Vector<java.util.Vector<java.lang.String>> list)
public abstract TargetList.ListTypes precedence()
TargetList.ListTypes
public void setTabConfig(PIRL.Configuration.Configuration config)
config
- a Configuration holding search parameterspublic java.util.Vector<java.lang.String> getScienceThemesList()
public abstract java.lang.String constructSearchQuery()
SearchInterface
Note: Many of the setters defined in this search interface are search criteria that are used to construct this query.
constructSearchQuery
in interface SearchInterface
SearchInterface.setMinimumLongitude(double)
,
SearchInterface.setMaximumLongitude(double)
,
SearchInterface.setMinimumLatitude(double)
,
SearchInterface.setMaximumLatitude(double)
,
SearchInterface.setMinimumLs(double)
,
SearchInterface.setMaximumLs(double)
,
SearchInterface.setPriorities(Vector)
,
SearchInterface.setScienceThemes(Vector)
,
SearchInterface.setSuggestionsPerThemeLimit(int)
,
SearchInterface.enableRowLimits(boolean)
,
SearchInterface.setRowLimit(int)
,
SearchInterface.setRetrieveNearestNeighborList(boolean)
public abstract java.lang.String constructSecondaryQuery()
SearchInterface
constructSecondaryQuery
in interface SearchInterface
public abstract java.util.Vector<java.util.Vector<java.lang.String>> executeSearch() throws PIRL.Database.Database_Exception
SearchInterface
SearchInterface.constructSearchQuery()
method.
Note that many of the getter and setters defined as part of the search
interface are used as parameters to define the search criteriaexecuteSearch
in interface SearchInterface
PIRL.Database.Database_Exception
- if an error occurs during query executionpublic void initOrderingSettings(PIRL.Configuration.Configuration config) throws PIRL.Configuration.Configuration_Exception
SearchInterface
To override this ordering, add a HiTList group to the configuration file, and specify the ordering fields as defined in the OrderingFields enum in the order that the columns should be ordered, eg:
GROUP = HiTList
GROUP = ORDERING_COLUMNS
THEME=ASC
PRIORITY_SECOND=DESC
ID_SECOND=ASC
END_GROUP
END_GROUP
initOrderingSettings
in interface SearchInterface
config
- A configuration that may contain column ordering information.PIRL.Configuration.Configuration_Exception
SearchInterface.constructSearchQuery()
,
TargetList.OrderingFields
public void setColumnNames(java.util.Vector<java.lang.String> columnNames)
public java.util.Vector<java.lang.String> getColumnNames()
public void setMinimumLongitude(double min_longitude)
SearchInterface
setMinimumLongitude
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMinimumLongitude()
SearchInterface
getMinimumLongitude
in interface SearchInterface
public void setMaximumLongitude(double max_longitude)
SearchInterface
setMaximumLongitude
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMaximumLongitude()
SearchInterface
getMaximumLongitude
in interface SearchInterface
public void setMinimumLatitude(double min_latitude)
SearchInterface
setMinimumLatitude
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMinimumLatitude()
SearchInterface
getMinimumLatitude
in interface SearchInterface
public void setMaximumLatitude(double max_latitude)
SearchInterface
setMaximumLatitude
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMaximumLatitude()
SearchInterface
getMaximumLatitude
in interface SearchInterface
public void setMinimumLs(double minLs)
SearchInterface
setMinimumLs
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMinimumLs()
SearchInterface
getMinimumLs
in interface SearchInterface
public void setMaximumLs(double maxLs)
SearchInterface
setMaximumLs
in interface SearchInterface
SearchInterface.constructSearchQuery()
public double getMaximumLs()
SearchInterface
getMaximumLs
in interface SearchInterface
public void setSuggestionsPerThemeLimit(int suggestions_per_theme)
SearchInterface
When the search results contain more than this number of targets in a theme, the additional targets will be discarded. Note that precisely which targets will be included may be significantly impacted by the order at which they come out of the database and any limits placed on the total number of targets to retrieve.
setSuggestionsPerThemeLimit
in interface SearchInterface
suggestions_per_theme
- - an integer value, Default 0.SearchInterface.constructSearchQuery()
,
SearchInterface.initOrderingSettings(Configuration)
,
SearchInterface.enableRowLimits(boolean)
,
SearchInterface.setRowLimit(int)
public int getSuggestionsPerThemeLimit()
SearchInterface
getSuggestionsPerThemeLimit
in interface SearchInterface
SearchInterface.setSuggestionsPerThemeLimit(int)
public void setRowLimit(int row_limit)
SearchInterface
setRowLimit
in interface SearchInterface
row_limit
- - an integerSearchInterface.constructSearchQuery()
public int getRowLimit()
SearchInterface
getRowLimit
in interface SearchInterface
public void enableRowLimits(boolean enable_row_limits)
SearchInterface
enableRowLimits
in interface SearchInterface
SearchInterface.constructSearchQuery()
,
SearchInterface.setRowLimit(int)
public boolean hasRowLimitsEnabled()
SearchInterface
SearchInterface.getRowLimit()
method will be passed to the database to determine the
total number of targets retrieved from the database.hasRowLimitsEnabled
in interface SearchInterface
SearchInterface.setRowLimit(int)
public void setScienceThemes(java.util.Vector<java.lang.String> theme_list)
SearchInterface
setScienceThemes
in interface SearchInterface
theme_list
- a Vector of Strings containing the list of allowed science
themes.SearchInterface.constructSearchQuery()
public java.util.Vector<java.lang.String> getSelectedScienceThemes()
SearchInterface
getSelectedScienceThemes
in interface SearchInterface
public void setPriorities(java.util.Vector<PriorityList> priorities)
SearchInterface
Note: if priority 10 is included, targets with priorities greater than 10 will also be included.
setPriorities
in interface SearchInterface
priorities
- - A Vector of Strings holding the set of priorities to
include.SearchInterface.constructSearchQuery()
public java.util.Vector<PriorityList> getSelectedPriorities()
SearchInterface
getSelectedPriorities
in interface SearchInterface
public java.util.Vector<java.lang.String> exportSelectedPriorites()
public void setRetrieveNearestNeighborList(boolean include_nearest)
SearchInterface
setRetrieveNearestNeighborList
in interface SearchInterface
include_nearest
- a boolean value to indicate if the nearest neighbor list
should be created and added to the data table.public boolean getRetrieveNearestNeighborList()
SearchInterface
getRetrieveNearestNeighborList
in interface SearchInterface
public void addSuggestions(java.util.Vector<java.lang.Integer> add_list)
SearchInterface
SearchInterface.addedSuggestionsNotFound()
method after the call to SearchInterface.executeSearch()
has completed.addSuggestions
in interface SearchInterface
add_list
- A Vector of Integer suggestion IDs.SearchInterface.addedSuggestionsNotFound()
public java.util.Vector<java.lang.Integer> getAddedSuggestions()
SearchInterface
getAddedSuggestions
in interface SearchInterface
SearchInterface.addSuggestions(Vector)
public abstract java.util.Vector<java.lang.Integer> addedSuggestionsNotFound()
SearchInterface
SearchInterface.addSuggestions(Vector)
were not found, they will be in the Vector
of Integers returned by this method.addedSuggestionsNotFound
in interface SearchInterface
SearchInterface.addSuggestions(Vector)
list
that weren't included in the final list.SearchInterface.addSuggestions(Vector)
public void valueChanged(javax.swing.event.ListSelectionEvent event)
valueChanged
in interface javax.swing.event.ListSelectionListener
public java.util.HashMap<java.lang.Integer,TargetWarning> getMissingSuggestionWarnings()
public void stateChanged(javax.swing.event.ChangeEvent event)
stateChanged
in interface javax.swing.event.ChangeListener
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
in interface java.awt.event.ItemListener
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona