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
Table load dialogue abstract superclass for registry-based DAL-like queries.
- Since:
- 22 Sep 2009
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DalTableLoadDialog
(String name, String protoName, String description, Capability capability, boolean showCapabilities, boolean autoQuery) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionPerforms syntactic checks on a string which should be a URL, and throws an informative RuntimeException if it is not.protected Component
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
(String serviceUrl) Returns an array of metadata items describing the resource being queried.Returns the current contents of the service URL field.Returns the component in which the URL selector is located.Returns the text field into which the user can enter the service URL.boolean
isReady()
void
setServiceUrl
(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
addToolbarAction, 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
Methods inherited from interface uk.ac.starlink.table.gui.TableLoadDialog
createTableLoader
-
Constructor Details
-
DalTableLoadDialog
protected DalTableLoadDialog(String name, String protoName, 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 Details
-
createQueryComponent
- Overrides:
createQueryComponent
in classRegistryServiceTableLoadDialog
-
isReady
public boolean isReady()- Overrides:
isReady
in classuk.ac.starlink.table.gui.AbstractTableLoadDialog
-
getServiceUrl
Returns the current contents of the service URL field.- Returns:
- currently filled in query service URL, if any
-
setServiceUrl
Sets the current contents of the service URL field.- Parameters:
url
- value to insert into service URL field
-
getServiceUrlField
Returns the text field into which the user can enter the service URL.- Returns:
- url field
-
getServiceUrlBox
Returns the component in which the URL selector is located.- Returns:
- URL selector container
-
checkUrl
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
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
Description copied from class:RegistryServiceTableLoadDialog
Returns 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:
getCapabilities
in classRegistryServiceTableLoadDialog
- Parameters:
resource
- registry resource- Returns:
- relevant capabilities from that resource
-