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 ClassesModifier and TypeClassDescriptionstatic enumEnum for TAP run modes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptResourceIdList(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.voidAdds a listener that will be informed if the effective TAP query specified by this dialogue may have changed.voidaddRunningQuery(UwsJob tapJob) Adds a running TAP query to the list of queries this dialogue is currently aware of.voidprotected Componentprotected TapTableLoadDialog.TapRunMode[]Returns the run modes provided by this dialogue.uk.ac.starlink.table.gui.TableLoaderprotected uk.ac.starlink.table.TableSequencecreateTableSequence(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 TapQueryPanelCreates a new TapQueryPanel.Returns an action that can log in/out to the currently displayed TAP service.uk.ac.starlink.util.ContentCodingReturns the HTTP content coding policy used for TAP queries and some metadata requests.Returns the TAP query panel currently visible.Returns the finder panel for this window.Returns the registry panel for this window.Returns a panel-specific reload action.Returns the currently selected run mode.Returns the currently selected TAP service.getUploadLabels(String adql) Returns a set of table identifers which are required for upload.protected uk.ac.starlink.table.StarTablegetUploadTable(String upLabel) Returns a table named by an upload specifier in an ADQL query.Returns a callback invoked when the user clicks on a displayed URL.uk.ac.starlink.votable.VOTableWriterReturns the VOTableWriter used for uploading table used by this dialog.booleanisReady()static voidMain method pops up an instance of this dialog.voidRemoves a listener for TAP query changes.voidsetContentCoding(uk.ac.starlink.util.ContentCoding coding) Sets the HTTP content coding policy to use for TAP queries and some metadata requests.voidsetMetaPolicy(TapMetaPolicy metaPolicy) Sets the policy used for TAP service metadata acquisition.voidsetPreferredOutputFormat(String ofmtName) Sets the preferred format in which the service is to provide the table output.voidsetServiceFinder(TapServiceFinder finder) Sets the object that can locate TAP services by table metadata.voidsetUrlHandler(Consumer<URL> urlHandler) Sets a callback invoked when the user clicks on a displayed URL.voidsetVOTableWriter(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
addToolbarAction, asIOException, createFormatSelector, getDescription, getIcon, getMenus, getName, getQueryComponent, getSelectedFormat, getSubmitAction, getToolbarActions, isAvailable, isComponentShowing, setIcon, setIconUrl, setMenus, setToolbarActions, submit, updateReady
-
Constructor Details
-
TapTableLoadDialog
public TapTableLoadDialog()Constructor.
-
-
Method Details
-
getUrlHandler
-
setUrlHandler
-
configure
- Specified by:
configurein interfaceuk.ac.starlink.table.gui.TableLoadDialog- Overrides:
configurein classuk.ac.starlink.table.gui.AbstractTableLoadDialog
-
createQueryComponent
- Specified by:
createQueryComponentin classuk.ac.starlink.table.gui.AbstractTableLoadDialog
-
getUploadTable
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:
createTableLoaderin interfaceuk.ac.starlink.table.gui.TableLoadDialog
-
addRunningQuery
Adds a running TAP query to the list of queries this dialogue is currently aware of.- Parameters:
tapJob- UWS job representing TAP query
-
setMetaPolicy
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
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
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
-
getVOTableWriter
public uk.ac.starlink.votable.VOTableWriter getVOTableWriter()Returns the VOTableWriter used for uploading table used by this dialog.- Returns:
- table upload writer
-
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
Returns a panel-specific reload action. When enabled, this performs some kind of update action relevant to the currently visible tab.- Returns:
- reload action
-
getAuthenticateAction
Returns an action that can log in/out to the currently displayed TAP service.- Returns:
- authentication action
-
acceptResourceIdList
Description copied from interface:DalLoaderTakes a list of resource ID values and may load them or a subset into this object's dialogue as appropriate.- Specified by:
acceptResourceIdListin interfaceDalLoader- Parameters:
ivoids- ivo:-type identifier stringsmsg- 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
Returns the currently selected TAP service.- Returns:
- TAP service description, or null
-
createRunModes
Returns the run modes provided by this dialogue.- Returns:
- run mode options
-
addQueryActionListener
Adds a listener that will be informed if the effective TAP query specified by this dialogue may have changed.- Parameters:
l- listener to add
-
removeQueryActionListener
Removes a listener for TAP query changes.- Parameters:
l- listener to remove
-
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 factorytapJob- UWS job representing async TAP querytapMeta- 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
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:
isReadyin classuk.ac.starlink.table.gui.AbstractTableLoadDialog
-
getCurrentTapQueryPanel
Returns the TAP query panel currently visible.- Returns:
- query panel
-
getRunMode
Returns the currently selected run mode.- Returns:
- run mode
-
getRegistryPanel
Returns the registry panel for this window.- Specified by:
getRegistryPanelin interfaceDalLoader- Returns:
- registry panel
-
getFinderPanel
Returns the finder panel for this window.- Returns:
- finder panel
-
getUploadLabels
-
main
Main method pops up an instance of this dialog. An initial TAP URL may be given on the command line.
-