Package uk.ac.starlink.vo

# Class KeywordServiceQueryFactory

java.lang.Object
uk.ac.starlink.vo.KeywordServiceQueryFactory

All Implemented Interfaces:
  `RegistryQueryFactory`

public class KeywordServiceQueryFactory extends Object implements RegistryQueryFactory
RegistryQueryFactory implementation which combines a fixed base query for a particular service type with a freeform keyword search.

Since:
  19 Dec 2008
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`KeywordServiceQueryFactory(Capability capability)`
Constructs a query factory which looks for services with a particular standard ID.

## Method Summary

Modifier and Type
Method
Description
`void`
`addEntryListener(ActionListener listener)`
Adds a listener which will be notified when the user has entered a query.
`JComponent`
`getComponent()`
May return a component which the user can interact with to select a query.
`RegistryQuery`
`getIdListQuery(String[] ivoids)`
Returns a registry query suitable for this query factory which queries a given list of IVO identifiers.
`RegistryQuery`
`getQuery()`
Returns the currently selected query.
`RegistrySelector`
`getRegistrySelector()`
Returns the registry component object associated with this object.
`void`
`removeEntryListener(ActionListener listener)`
Removes a listener previously added by `RegistryQueryFactory.addEntryListener(java.awt.event.ActionListener)`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### KeywordServiceQueryFactory

public KeywordServiceQueryFactory(Capability capability)
Constructs a query factory which looks for services with a particular standard ID.

Parameters:
  `capability` - description of capability which all results must have

## Method Details

### getQuery

public RegistryQuery getQuery() throws MalformedURLException
Description copied from interface: `RegistryQueryFactory`
Returns the currently selected query.

Specified by:
  `getQuery` in interface `RegistryQueryFactory`
Returns:
  query object
Throws:
  `MalformedURLException`

### getIdListQuery

public RegistryQuery getIdListQuery(String[] ivoids) throws MalformedURLException
Description copied from interface: `RegistryQueryFactory`
Returns a registry query suitable for this query factory which queries a given list of IVO identifiers.

Specified by:
  `getIdListQuery` in interface `RegistryQueryFactory`
Parameters:
  `ivoids` - ivo:-type resource identifiers
Returns:
  registry query whose results are suitable for a result of this query factory; may be null
Throws:
  `MalformedURLException`

### getComponent

public JComponent getComponent()
Description copied from interface: `RegistryQueryFactory`
May return a component which the user can interact with to select a query. If it returns null, this factory is considered to be non-interactive (only capable of supplying a single fixed query).

Specified by:
  `getComponent` in interface `RegistryQueryFactory`
Returns:
  GUI component for query selection, or null

### addEntryListener

public void addEntryListener(ActionListener listener)
Description copied from interface: `RegistryQueryFactory`
Adds a listener which will be notified when the user has entered a query.

Specified by:
  `addEntryListener` in interface `RegistryQueryFactory`
Parameters:
  `listener` - listener

### removeEntryListener

public void removeEntryListener(ActionListener listener)
Description copied from interface: `RegistryQueryFactory`
Removes a listener previously added by `RegistryQueryFactory.addEntryListener(java.awt.event.ActionListener)`.

Specified by:
  `removeEntryListener` in interface `RegistryQueryFactory`
Parameters:
  `listener` - listener

### getRegistrySelector

public RegistrySelector getRegistrySelector()
Description copied from interface: `RegistryQueryFactory`
Returns the registry component object associated with this object.

Specified by:
  `getRegistrySelector` in interface `RegistryQueryFactory`
Returns:
  registry selector