Package uk.ac.starlink.vo
Class DalTableLoadDialog
- java.lang.Object
-
- uk.ac.starlink.table.gui.AbstractTableLoadDialog
-
- uk.ac.starlink.vo.RegistryServiceTableLoadDialog
-
- uk.ac.starlink.vo.DalTableLoadDialog
-
- All Implemented Interfaces:
uk.ac.starlink.table.gui.TableLoadDialog
- Direct Known Subclasses:
SkyDalTableLoadDialog
public abstract class DalTableLoadDialog extends RegistryServiceTableLoadDialog
Table load dialogue abstract superclass for registry-based DAL-like queries.- Since:
- 22 Sep 2009
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDalTableLoadDialog(java.lang.String name, java.lang.String protoName, java.lang.String description, Capability capability, boolean showCapabilities, boolean autoQuery)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URLcheckUrl(java.lang.String url)Performs syntactic checks on a string which should be a URL, and throws an informative RuntimeException if it is not.protected java.awt.ComponentcreateQueryComponent()RegCapabilityInterface[]getCapabilities(RegResource resource)Returns the capabilities associated with a given resource.uk.ac.starlink.table.DescribedValue[]getMetadata(RegResource resource, RegCapabilityInterface cap)Returns a list of described values for the resource object representing a DAL service.uk.ac.starlink.table.DescribedValue[]getResourceMetadata(java.lang.String serviceUrl)Returns an array of metadata items describing the resource being queried.java.lang.StringgetServiceUrl()Returns the current contents of the service URL field.javax.swing.JComponentgetServiceUrlBox()Returns the component in which the URL selector is located.javax.swing.JTextFieldgetServiceUrlField()Returns the text field into which the user can enter the service URL.booleanisReady()voidsetServiceUrl(java.lang.String url)Sets the current contents of the service URL field.-
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
-
-
-
-
Constructor Detail
-
DalTableLoadDialog
protected DalTableLoadDialog(java.lang.String name, java.lang.String protoName, java.lang.String description, Capability capability, boolean showCapabilities, boolean autoQuery)Constructor.- Parameters:
name- dialogue nameprotoName- short name (perhaps acronym) for protocoldescription- dialogue descriptioncapability- service capability typeshowCapabilities- true to display the capabilities JTable as well as the Resource one; sensible if resource:capabilities relationship may not be 1:1autoQuery- populate service table with full registry query on initial display
-
-
Method Detail
-
createQueryComponent
protected java.awt.Component createQueryComponent()
- Overrides:
createQueryComponentin classRegistryServiceTableLoadDialog
-
isReady
public boolean isReady()
- Overrides:
isReadyin classuk.ac.starlink.table.gui.AbstractTableLoadDialog
-
getServiceUrl
public java.lang.String getServiceUrl()
Returns the current contents of the service URL field.- Returns:
- currently filled in query service URL, if any
-
setServiceUrl
public void setServiceUrl(java.lang.String url)
Sets the current contents of the service URL field.- Parameters:
url- value to insert into service URL field
-
getServiceUrlField
public javax.swing.JTextField getServiceUrlField()
Returns the text field into which the user can enter the service URL.- Returns:
- url field
-
getServiceUrlBox
public javax.swing.JComponent getServiceUrlBox()
Returns the component in which the URL selector is located.- Returns:
- URL selector container
-
checkUrl
public java.net.URL checkUrl(java.lang.String url)
Performs syntactic checks on a string which should be a URL, and throws an informative RuntimeException if it is not.- Parameters:
url- string to test for URL-ness- Returns:
- the url as URL if correct, never null
-
getResourceMetadata
public uk.ac.starlink.table.DescribedValue[] getResourceMetadata(java.lang.String serviceUrl)
Returns an array of metadata items describing the resource being queried.- Parameters:
serviceUrl- service URL of query - may or may not be that of the currently selected resource/capability- Returns:
- metadata array
-
getMetadata
public uk.ac.starlink.table.DescribedValue[] getMetadata(RegResource resource, RegCapabilityInterface cap)
Returns a list of described values for the resource object representing a DAL service.- Parameters:
resource- DAL resourcecap- DAL capability interface
-
getCapabilities
public RegCapabilityInterface[] getCapabilities(RegResource resource)
Description copied from class:RegistryServiceTableLoadDialogReturns 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.- Overrides:
getCapabilitiesin classRegistryServiceTableLoadDialog- Parameters:
resource- registry resource- Returns:
- relevant capabilities from that resource
-
-