# Class SearchVizierMode

java.lang.Object
uk.ac.starlink.topcat.vizier.SearchVizierMode

All Implemented Interfaces:
  `VizierMode`

Direct Known Subclasses:
  `CategoryVizierMode, WordVizierMode`

public abstract class SearchVizierMode extends Object implements VizierMode
Abstract VizierMode which presents a list of catalogues as selected in some way by other GUI actions of the user.

Since:
  19 Oct 2009
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`SearchVizierMode(String name, VizierTableLoadDialog tld, boolean useSplit)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected abstract Component`
`createSearchComponent()`
Constructs the GUI component which the user will fill in to specify what catalogues they want to select from.
`Component`
`getComponent()`
Returns the graphical component containing user controls for this mode.
`String`
`getName()`
Returns a name for this mode.
`JTable`
`getQueryableTable()`
Returns a table whose rows represent VizieR catalogues.
`Action`
`getSearchAction()`
Returns the action which starts a search for catalogues.
`protected abstract String`
`getSearchArgs()`
Returns the arguments, based on the current state of the search component, to pass to the VizieR server to search for available catalogues.
`VizierInfo`
`getVizierInfo()`
Returns the vizier info object.
`boolean`
`includeObsoletes()`
Indicates whether the search should report obsolete tables or just the newest version of each.
`boolean`
`includeSubTables()`
Indicates whether the search should report sub-tables or just top-level resources.
`void`
`setVizierInfo(VizierInfo vizinfo)`
Sets the object which can query a VizieR server and store metadata.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface VizierMode

`readData`

## Constructor Details

### SearchVizierMode

public SearchVizierMode(String name, VizierTableLoadDialog tld, boolean useSplit)
Constructor.

Parameters:
  `name` - mode name
  `tld` - controlling load dialogue instance
  `useSplit` - true to use a JSplitPane to separate query panel from catalogue display table; false to use a fixed layout

## Method Details

### createSearchComponent

protected abstract Component createSearchComponent()
Constructs the GUI component which the user will fill in to specify what catalogues they want to select from. The setEnable() method on the returned component should ideally enable/disable all GUI controls visible in it.

Returns:
  search component

### getSearchArgs

protected abstract String getSearchArgs()
Returns the arguments, based on the current state of the search component, to pass to the VizieR server to search for available catalogues.

Returns:
  URL fragment giving catalogue search arguments

### getName

public String getName()
Description copied from interface: `VizierMode`
Returns a name for this mode.

Specified by:
  `getName` in interface `VizierMode`
Returns:
  name mode name

### setVizierInfo

public void setVizierInfo(VizierInfo vizinfo)
Description copied from interface: `VizierMode`
Sets the object which can query a VizieR server and store metadata. This method must be called before the mode is called upon to contact the server.

Specified by:
  `setVizierInfo` in interface `VizierMode`
Parameters:
  `vizinfo` - vizier search object

### getVizierInfo

public VizierInfo getVizierInfo()
Returns the vizier info object.

Returns:
  vizinfo

### getComponent

public Component getComponent()
Description copied from interface: `VizierMode`
Returns the graphical component containing user controls for this mode.

Specified by:
  `getComponent` in interface `VizierMode`
Returns:
  component

### getQueryableTable

public JTable getQueryableTable()
Description copied from interface: `VizierMode`
Returns a table whose rows represent VizieR catalogues. The table's model must be a `ArrayTableModel` with items that are `Queryable`s.

Specified by:
  `getQueryableTable` in interface `VizierMode`
Returns:
  table of queryable objects representing Vizier catalogues

### getSearchAction

public Action getSearchAction()
Returns the action which starts a search for catalogues.

Returns:
  start search action

### includeSubTables

public boolean includeSubTables()
Indicates whether the search should report sub-tables or just top-level resources.

Returns:
  false for just top-level resources, true for sub-tables as well

### includeObsoletes

public boolean includeObsoletes()
Indicates whether the search should report obsolete tables or just the newest version of each.

Returns:
  false for just current versions, true for obsolete versions as well