Class TapTableLoadDialog

java.lang.Object
uk.ac.starlink.table.gui.AbstractTableLoadDialog
uk.ac.starlink.vo.TapTableLoadDialog
All Implemented Interfaces:
uk.ac.starlink.table.gui.TableLoadDialog, DalLoader

public class TapTableLoadDialog extends uk.ac.starlink.table.gui.AbstractTableLoadDialog implements DalLoader
Load dialogue for TAP services.
Since:
18 Jan 2011
Author:
Mark Taylor
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum for TAP run modes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Takes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.
    void
    Adds a running TAP query to the list of queries this dialogue is currently aware of.
    void
    configure(uk.ac.starlink.table.StarTableFactory tfact, Action submitAct)
     
    protected Component
     
    Returns the run modes provided by this dialogue.
    uk.ac.starlink.table.gui.TableLoader
     
    protected uk.ac.starlink.table.TableSequence
    createTableSequence(uk.ac.starlink.table.StarTableFactory tfact, UwsJob tapJob, uk.ac.starlink.table.DescribedValue[] tapMeta)
    Returns a table sequence constructed from a given TAP query.
    protected TapQueryPanel
    Creates a new TapQueryPanel.
    uk.ac.starlink.util.ContentCoding
    Returns the HTTP content coding policy used for TAP queries and some metadata requests.
    Returns the registry panel for this dialogue.
    Returns a panel-specific reload action.
    Returns the currently selected TAP service.
    protected uk.ac.starlink.table.StarTable
    Returns a table named by an upload specifier in an ADQL query.
    boolean
     
    static void
    main(String[] args)
    Main method pops up an instance of this dialog.
    void
    setContentCoding(uk.ac.starlink.util.ContentCoding coding)
    Sets the HTTP content coding policy to use for TAP queries and some metadata requests.
    void
    Sets the policy used for TAP service metadata acquisition.
    void
    Sets the preferred format in which the service is to provide the table output.
    void
    Sets the object that can locate TAP services by table metadata.
    void
    setVOTableWriter(uk.ac.starlink.votable.VOTableWriter vowriter)
    Sets the VOTableWriter used to serialise tables for upload to the TAP service when upload queries are performed.

    Methods inherited from class uk.ac.starlink.table.gui.AbstractTableLoadDialog

    asIOException, createFormatSelector, getDescription, getIcon, getMenus, getName, getQueryComponent, getSelectedFormat, getSubmitAction, getToolbarActions, isAvailable, isComponentShowing, 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.vo.DalLoader

    getMenus, setMenus
  • Constructor Details

    • TapTableLoadDialog

      public TapTableLoadDialog()
      Constructor.
  • Method Details

    • configure

      public void configure(uk.ac.starlink.table.StarTableFactory tfact, Action submitAct)
      Specified by:
      configure in interface uk.ac.starlink.table.gui.TableLoadDialog
      Overrides:
      configure in class uk.ac.starlink.table.gui.AbstractTableLoadDialog
    • createQueryComponent

      protected Component createQueryComponent()
      Specified by:
      createQueryComponent in class uk.ac.starlink.table.gui.AbstractTableLoadDialog
    • getUploadTable

      protected uk.ac.starlink.table.StarTable getUploadTable(String upLabel)
      Returns a table named by an upload specifier in an ADQL query. The TapTableLoadDialog implementation of this throws an exception, but subclasses may override this if they are capable of providing uploadable tables. If no table named by the given label is available, it is good practice to throw an IllegalArgumentException with an informative message, though returning null is also acceptable.
      Parameters:
      upLabel - name part of an uploaded table specification, that is the part following the "TAP_UPLOAD." part
      Returns:
      table named by upLabel
    • createTableLoader

      public uk.ac.starlink.table.gui.TableLoader createTableLoader()
      Specified by:
      createTableLoader in interface uk.ac.starlink.table.gui.TableLoadDialog
    • addRunningQuery

      public void addRunningQuery(UwsJob tapJob)
      Adds a running TAP query to the list of queries this dialogue is currently aware of.
      Parameters:
      tapJob - UWS job representing TAP query
    • setMetaPolicy

      public void setMetaPolicy(TapMetaPolicy metaPolicy)
      Sets the policy used for TAP service metadata acquisition. As currently implemented, a change in policy triggers a reload of the metadata for the currently displayed service metadata, though not for other cached ones.
      Parameters:
      metaPolicy - new metadata acquisition policy
    • setPreferredOutputFormat

      public void setPreferredOutputFormat(String ofmtName)
      Sets the preferred format in which the service is to provide the table output. This had better represent some form of VOTable. The supplied name may be a MIME type, an alias, or an ivo-id as described in sec 2.4 of TAPRegExt v1.0. If the supplied name is null, or if no output format has been declared by the service corresponding to the supplied name, then the service's default output format will be used.
      Parameters:
      ofmtName - output format MIME type, alias or ivo-id
    • setServiceFinder

      public void setServiceFinder(TapServiceFinder finder)
      Sets the object that can locate TAP services by table metadata. Invoking this with a new finder instance initiates an asynchronous search for TAP services.
      Parameters:
      finder - new finder
    • setVOTableWriter

      public void setVOTableWriter(uk.ac.starlink.votable.VOTableWriter vowriter)
      Sets the VOTableWriter used to serialise tables for upload to the TAP service when upload queries are performed.
      Parameters:
      vowriter - new votable serializer
    • setContentCoding

      public void setContentCoding(uk.ac.starlink.util.ContentCoding coding)
      Sets the HTTP content coding policy to use for TAP queries and some metadata requests. Subsequent communications will use this setting.
      Parameters:
      coding - configures HTTP compression
    • getContentCoding

      public uk.ac.starlink.util.ContentCoding getContentCoding()
      Returns the HTTP content coding policy used for TAP queries and some metadata requests.
      Returns:
      current HTTP compression configuration
    • getReloadAction

      public Action getReloadAction()
      Returns a panel-specific reload action. When enabled, this performs some kind of update action relevant to the currently visible tab.
      Returns:
      reload action
    • acceptResourceIdList

      public boolean acceptResourceIdList(String[] ivoids, String msg)
      Description copied from interface: DalLoader
      Takes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.
      Specified by:
      acceptResourceIdList in interface DalLoader
      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
    • getTapService

      public TapService getTapService()
      Returns the currently selected TAP service.
      Returns:
      TAP service description, or null
    • createRunModes

      protected TapTableLoadDialog.TapRunMode[] createRunModes()
      Returns the run modes provided by this dialogue.
      Returns:
      run mode options
    • createTableSequence

      protected uk.ac.starlink.table.TableSequence createTableSequence(uk.ac.starlink.table.StarTableFactory tfact, UwsJob tapJob, uk.ac.starlink.table.DescribedValue[] tapMeta) throws IOException
      Returns a table sequence constructed from a given TAP query. This method marks each TapQuery for deletion on JVM shutdown. Subclass implementations may override this method to perform different job deletion behaviour.
      Parameters:
      tfact - table factory
      tapJob - UWS job representing async TAP query
      tapMeta - metadata describing the query suitable for decorating the resulting table
      Returns:
      table sequence suitable for a successful return from this dialog's TableLoader
      Throws:
      IOException
    • createTapQueryPanel

      protected TapQueryPanel createTapQueryPanel()
      Creates a new TapQueryPanel. This is called when a new TAP service is selected. The default implementation constructs one with a basic set of examples, but it can be overridden for more specialised behaviour.
      Returns:
      new query panel
    • isReady

      public boolean isReady()
      Overrides:
      isReady in class uk.ac.starlink.table.gui.AbstractTableLoadDialog
    • getRegistryPanel

      public RegistryPanel getRegistryPanel()
      Description copied from interface: DalLoader
      Returns the registry panel for this dialogue.
      Specified by:
      getRegistryPanel in interface DalLoader
      Returns:
      registry panel
    • main

      public static void main(String[] args)
      Main method pops up an instance of this dialog. An initial TAP URL may be given on the command line.