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
`protected`
`DalTableLoadDialog(String name, String protoName, String description, Capability capability, boolean showCapabilities, boolean autoQuery)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`URL`
`checkUrl(String url)`
Performs syntactic checks on a string which should be a URL, and throws an informative RuntimeException if it is not.
`protected Component`
`createQueryComponent()`
`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(String serviceUrl)`
Returns an array of metadata items describing the resource being queried.
`String`
`getServiceUrl()`
Returns the current contents of the service URL field.
`JComponent`
`getServiceUrlBox()`
Returns the component in which the URL selector is located.
`JTextField`
`getServiceUrlField()`
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 name
  `protoName` - short name (perhaps acronym) for protocol
  `description` - dialogue description
  `capability` - service capability type
  `showCapabilities` - true to display the capabilities JTable as well as the Resource one; sensible if resource:capabilities relationship may not be 1:1
  `autoQuery` - populate service table with full registry query on initial display

## Method Details

### createQueryComponent

protected Component createQueryComponent()

Overrides:
  `createQueryComponent` in class `RegistryServiceTableLoadDialog`

### isReady

public boolean isReady()

Overrides:
  `isReady` in class `uk.ac.starlink.table.gui.AbstractTableLoadDialog`

### getServiceUrl

public String getServiceUrl()
Returns the current contents of the service URL field.

Returns:
  currently filled in query service URL, if any

### setServiceUrl

public void setServiceUrl(String url)
Sets the current contents of the service URL field.

Parameters:
  `url` - value to insert into service URL field

### getServiceUrlField

public JTextField getServiceUrlField()
Returns the text field into which the user can enter the service URL.

Returns:
  url field

### getServiceUrlBox

public JComponent getServiceUrlBox()
Returns the component in which the URL selector is located.

Returns:
  URL selector container

### checkUrl

public URL checkUrl(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(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 resource
  `cap` - DAL capability interface

### getCapabilities

public RegCapabilityInterface[] getCapabilities(RegResource resource)
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 class `RegistryServiceTableLoadDialog`
Parameters:
  `resource` - registry resource
Returns:
  relevant capabilities from that resource