uk.ac.starlink.vo
Class RegistryServiceTableLoadDialog

java.lang.Object
  extended by uk.ac.starlink.table.gui.AbstractTableLoadDialog
      extended by uk.ac.starlink.vo.RegistryServiceTableLoadDialog
All Implemented Interfaces:
TableLoadDialog
Direct Known Subclasses:
DalTableLoadDialog

public abstract class RegistryServiceTableLoadDialog
extends AbstractTableLoadDialog

Partial implementation of a table load dialogue which has two parts: first a query on the registry to locate a set of suitable services, and then a query to one of the services selected from that list. Concrete subclasses should populate the control box getControlBox() with service-specific controls and implement the abstract TableLoadDialog.createTableLoader() method appropriately.

Since:
6 Jan 2005
Author:
Mark Taylor (Starlink)

Constructor Summary
RegistryServiceTableLoadDialog(String name, String protoName, String description, RegistryQueryFactory queryFactory, boolean showCapabilities)
          Constructor.
 
Method Summary
 boolean acceptResourceIdList(String[] ivoids, String msg)
          Takes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.
protected  Component createQueryComponent()
          Constructs the query component used by this dialogue.
 RegCapabilityInterface[] getCapabilities(RegResource resource)
          Returns the capabilities associated with a given resource.
protected  JComponent getControlBox()
          Returns the component within which service-specific components should be placed.
 RegistryQueryFactory getQueryFactory()
          Returns the query factory used by this dialogue.
 JMenuItem[] getRegistryMenuItems()
          Returns a list of menu items for actions associated with this component.
 RegistryPanel getRegistryPanel()
          Returns the registry panel for this dialogue.
 
Methods inherited from class uk.ac.starlink.table.gui.AbstractTableLoadDialog
asIOException, configure, createFormatSelector, getDescription, getIcon, getMenus, getName, getQueryComponent, getSelectedFormat, getSubmitAction, getToolbarActions, isAvailable, isComponentShowing, isReady, setIcon, setIconUrl, setMenus, setToolbarActions, submit, updateReady
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.table.gui.TableLoadDialog
createTableLoader
 

Constructor Detail

RegistryServiceTableLoadDialog

public RegistryServiceTableLoadDialog(String name,
                                      String protoName,
                                      String description,
                                      RegistryQueryFactory queryFactory,
                                      boolean showCapabilities)
Constructor.

Parameters:
name - dialogue name
protoName - short name (perhaps acronym) for protocol
description - dialogue description
queryFactory - source of registry query definition
showCapabilities - true to display the capabilities JTable as well as the Resource one; sensible if resource:capabilities relationship may not be 1:1
Method Detail

getRegistryMenuItems

public JMenuItem[] getRegistryMenuItems()
Returns a list of menu items for actions associated with this component.

Returns:
registry menu item list

acceptResourceIdList

public boolean acceptResourceIdList(String[] ivoids,
                                    String msg)
Takes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.

Parameters:
ivoids - ivo:-type identifier strings
msg - text of user-directed message to explain where the IDs came from
Returns:
true iff at least some of the resources were, or may be, loaded into this window

createQueryComponent

protected Component createQueryComponent()
Description copied from class: AbstractTableLoadDialog
Constructs the query component used by this dialogue. Called only once (lazily).

Specified by:
createQueryComponent in class AbstractTableLoadDialog
Returns:
query component

getControlBox

protected JComponent getControlBox()
Returns the component within which service-specific components should be placed. Will return null if called before createQueryComponent().

Returns:
control box

getRegistryPanel

public RegistryPanel getRegistryPanel()
Returns the registry panel for this dialogue. Will return null if called before createQueryComponent().

Returns:
registry panel

getCapabilities

public RegCapabilityInterface[] getCapabilities(RegResource resource)
Returns the capabilities associated with a given resource. This determines those capabilities which will be displayed and selecatable for each resource. The default implementation is to include all capabilities; this may however be overridded in a more selective way by subclasses.

Parameters:
resource - registry resource
Returns:
relevant capabilities from that resource

getQueryFactory

public RegistryQueryFactory getQueryFactory()
Returns the query factory used by this dialogue.

Returns:
query factory


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.