uk.ac.starlink.vo
Class TapTableLoadDialog

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

public class TapTableLoadDialog
extends DalTableLoadDialog

Load dialogue for TAP services.

Since:
18 Jan 2011
Author:
Mark Taylor
See Also:
IVOA TAP Recommendation

Constructor Summary
TapTableLoadDialog()
          Constructor.
 
Method Summary
 void addRunningQuery(UwsJob tapJob)
          Adds a running TAP query to the list of queries this dialogue is currently aware of.
protected  Component createQueryComponent()
          Constructs the query component used by this dialogue.
 TableLoader createTableLoader()
          Returns a new object which specifies how table loading is to be performed.
protected  TableSequence createTableSequence(StarTableFactory tfact, UwsJob tapJob, DescribedValue[] tapMeta)
          Returns a table sequence constructed from a given TAP query.
protected  TapQueryPanel createTapQueryPanel()
          Creates a new TapQueryPanel.
protected  StarTable getUploadTable(String upLabel)
          Returns a table named by an upload specifier in an ADQL query.
 boolean isReady()
          Indicates whether the submit action should be enabled.
 
Methods inherited from class uk.ac.starlink.vo.DalTableLoadDialog
checkUrl, getCapabilities, getMetadata, getResourceMetadata, getServiceUrl, getServiceUrlField, setServiceUrl
 
Methods inherited from class uk.ac.starlink.vo.RegistryServiceTableLoadDialog
acceptResourceIdList, getControlBox, getQueryFactory, getRegistryMenuItems, getRegistryPanel
 
Methods inherited from class uk.ac.starlink.table.gui.AbstractTableLoadDialog
asIOException, configure, 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
 

Constructor Detail

TapTableLoadDialog

public TapTableLoadDialog()
Constructor.

Method Detail

createQueryComponent

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

Overrides:
createQueryComponent in class DalTableLoadDialog
Returns:
query component

getUploadTable

protected 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 TableLoader createTableLoader()
Description copied from interface: TableLoadDialog
Returns a new object which specifies how table loading is to be performed. The actions performed by the returned object will presumably be determined by the state at call time of this dialogues GUI component.

If the dialogue is not in a suitable state, either return null, or, if you want to provide more detailed information about what's wrong, throw a RuntimeException with an informative message.

Returns:
new table loader object

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

createTableSequence

protected TableSequence createTableSequence(StarTableFactory tfact,
                                            UwsJob tapJob,
                                            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()
Description copied from class: AbstractTableLoadDialog
Indicates whether the submit action should be enabled. The implementation should return true if the user should be allowed to submit the query, or false if the internal state of this dialogue is known to be incomplete in some way. Evaluation should be fast; the return does not need to provide a guarantee that a submitted query will suceed.

The default implementation returns true.

Overrides:
isReady in class DalTableLoadDialog
Returns:
false iff dialogue state is known to be incomplete


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