Class RegistryServiceTableLoadDialog

  • All Implemented Interfaces:
    uk.ac.starlink.table.gui.TableLoadDialog
    Direct Known Subclasses:
    DalTableLoadDialog

    public abstract class RegistryServiceTableLoadDialog
    extends uk.ac.starlink.table.gui.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)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptResourceIdList​(java.lang.String[] ivoids, java.lang.String msg)
      Takes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.
      protected java.awt.Component createQueryComponent()  
      RegCapabilityInterface[] getCapabilities​(RegResource resource)
      Returns the capabilities associated with a given resource.
      protected javax.swing.JComponent getControlBox()
      Returns the component within which service-specific components should be placed.
      RegistryQueryFactory getQueryFactory()
      Returns the query factory used by this dialogue.
      javax.swing.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​(java.lang.String name,
                                              java.lang.String protoName,
                                              java.lang.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 javax.swing.JMenuItem[] getRegistryMenuItems()
        Returns a list of menu items for actions associated with this component.
        Returns:
        registry menu item list
      • acceptResourceIdList

        public boolean acceptResourceIdList​(java.lang.String[] ivoids,
                                            java.lang.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 java.awt.Component createQueryComponent()
        Specified by:
        createQueryComponent in class uk.ac.starlink.table.gui.AbstractTableLoadDialog
      • getControlBox

        protected javax.swing.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