public class TapTableLoadDialog extends AbstractTableLoadDialog implements DalLoader
Modifier and Type | Class and Description |
---|---|
static class |
TapTableLoadDialog.TapRunMode
Enum for TAP run modes.
|
Constructor and Description |
---|
TapTableLoadDialog()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addQueryActionListener(ActionListener l)
Adds a listener that will be informed if the effective TAP query
specified by this dialogue may have changed.
|
void |
addRunningQuery(UwsJob tapJob)
Adds a running TAP query to the list of queries this dialogue
is currently aware of.
|
void |
configure(StarTableFactory tfact,
Action submitAct)
Provides some configuration which must be performed before use.
|
protected Component |
createQueryComponent()
Constructs the query component used by this dialogue.
|
protected TapTableLoadDialog.TapRunMode[] |
createRunModes()
Returns the run modes provided 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.
|
Action |
getAuthenticateAction()
Returns an action that can log in/out to the currently displayed
TAP service.
|
ContentCoding |
getContentCoding()
Returns the HTTP content coding policy used for TAP queries and
some metadata requests.
|
TapQueryPanel |
getCurrentTapQueryPanel()
Returns the TAP query panel currently visible.
|
TapServiceFinderPanel |
getFinderPanel()
Returns the finder panel for this window.
|
RegistryPanel |
getRegistryPanel()
Returns the registry panel for this window.
|
Action |
getReloadAction()
Returns a panel-specific reload action.
|
TapTableLoadDialog.TapRunMode |
getRunMode()
Returns the currently selected run mode.
|
TapService |
getTapService()
Returns the currently selected TAP service.
|
static Set<String> |
getUploadLabels(String adql)
Returns a set of table identifers which are required for upload.
|
protected StarTable |
getUploadTable(String upLabel)
Returns a table named by an upload specifier in an ADQL query.
|
java.util.function.Consumer<URL> |
getUrlHandler()
Returns a callback invoked when the user clicks on a displayed URL.
|
VOTableWriter |
getVOTableWriter()
Returns the VOTableWriter used for uploading table used by this dialog.
|
boolean |
isReady()
Indicates whether the submit action should be enabled.
|
static void |
main(String[] args)
Main method pops up an instance of this dialog.
|
void |
removeQueryActionListener(ActionListener l)
Removes a listener for TAP query changes.
|
void |
setContentCoding(ContentCoding coding)
Sets the HTTP content coding policy to use for TAP queries and
some metadata requests.
|
void |
setMetaPolicy(TapMetaPolicy metaPolicy)
Sets the policy used for TAP service metadata acquisition.
|
void |
setPreferredOutputFormat(String ofmtName)
Sets the preferred format in which the service is to provide the
table output.
|
void |
setServiceFinder(TapServiceFinder finder)
Sets the object that can locate TAP services by table metadata.
|
void |
setUrlHandler(java.util.function.Consumer<URL> urlHandler)
Sets a callback invoked when the user clicks on a displayed URL.
|
void |
setVOTableWriter(VOTableWriter vowriter)
Sets the VOTableWriter used to serialise tables for upload
to the TAP service when upload queries are performed.
|
addToolbarAction, asIOException, createFormatSelector, getDescription, getIcon, getMenus, getName, getQueryComponent, getSelectedFormat, getSubmitAction, getToolbarActions, isAvailable, isComponentShowing, setIcon, setIconUrl, setMenus, setToolbarActions, submit, updateReady
public java.util.function.Consumer<URL> getUrlHandler()
public void setUrlHandler(java.util.function.Consumer<URL> urlHandler)
urlHandler
- url click handlerpublic void configure(StarTableFactory tfact, Action submitAct)
TableLoadDialog
TableLoadDialog.getQueryComponent()
is called.
The tfact
argument provides a table factory which
resembles the one to be used for generating tables.
Although this factory should not in general be used or retained,
since the one presented later to the TableLoader should be used
instead, it can be interrogated for known table formats etc.
The submitAct
argument sets the action which
when invoked will cause TableLoadDialog.createTableLoader()
to be called.
Its setEnabled method can be called to reflect readiness,
and it can be added as a listener to dialogue-specific events
which indicate that a selection has been made.
configure
in interface TableLoadDialog
configure
in class AbstractTableLoadDialog
tfact
- representative table factorysubmitAct
- action for load submissionprotected Component createQueryComponent()
AbstractTableLoadDialog
createQueryComponent
in class AbstractTableLoadDialog
protected StarTable getUploadTable(String upLabel)
upLabel
- name part of an uploaded table specification,
that is the part following the "TAP_UPLOAD." partupLabel
public TableLoader createTableLoader()
TableLoadDialog
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.
createTableLoader
in interface TableLoadDialog
public void addRunningQuery(UwsJob tapJob)
tapJob
- UWS job representing TAP querypublic void setMetaPolicy(TapMetaPolicy metaPolicy)
metaPolicy
- new metadata acquisition policypublic void setPreferredOutputFormat(String ofmtName)
ofmtName
- output format MIME type, alias or ivo-idpublic void setServiceFinder(TapServiceFinder finder)
finder
- new finderpublic void setVOTableWriter(VOTableWriter vowriter)
vowriter
- new votable serializerpublic VOTableWriter getVOTableWriter()
public void setContentCoding(ContentCoding coding)
coding
- configures HTTP compressionpublic ContentCoding getContentCoding()
public Action getReloadAction()
public Action getAuthenticateAction()
public boolean acceptResourceIdList(String[] ivoids, String msg)
DalLoader
acceptResourceIdList
in interface DalLoader
ivoids
- ivo:-type identifier stringsmsg
- text of user-directed message to explain where the
IDs came frompublic TapService getTapService()
protected TapTableLoadDialog.TapRunMode[] createRunModes()
public void addQueryActionListener(ActionListener l)
l
- listener to addpublic void removeQueryActionListener(ActionListener l)
l
- listener to removeprotected TableSequence createTableSequence(StarTableFactory tfact, UwsJob tapJob, DescribedValue[] tapMeta) throws IOException
tfact
- table factorytapJob
- UWS job representing async TAP querytapMeta
- metadata describing the query suitable for
decorating the resulting tableIOException
protected TapQueryPanel createTapQueryPanel()
public boolean isReady()
AbstractTableLoadDialog
The default implementation returns true.
isReady
in class AbstractTableLoadDialog
public TapQueryPanel getCurrentTapQueryPanel()
public TapTableLoadDialog.TapRunMode getRunMode()
public RegistryPanel getRegistryPanel()
getRegistryPanel
in interface DalLoader
public TapServiceFinderPanel getFinderPanel()
public static Set<String> getUploadLabels(String adql)
adql
- ADQL/S textpublic static void main(String[] args)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.