Package uk.ac.starlink.vo

## Class KeywordServiceQueryFactory

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

- All Implemented Interfaces:
    `RegistryQueryFactory`

      public class KeywordServiceQueryFactory
      extends java.lang.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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addEntryListener​(java.awt.event.ActionListener listener)` | Adds a listener which will be notified when the user has entered a query.
    `javax.swing.JComponent` | `getComponent()` | May return a component which the user can interact with to select a query.
    `RegistryQuery` | `getIdListQuery​(java.lang.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​(java.awt.event.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 Detail

    - #### 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 Detail

    - #### getQuery

          public RegistryQuery getQuery()
                                 throws java.net.MalformedURLException

      Description copied from interface: `RegistryQueryFactory`
      Returns the currently selected query.
      Specified by:
        `getQuery` in interface `RegistryQueryFactory`
      Returns:
        query object
      Throws:
        `java.net.MalformedURLException`

    - #### getIdListQuery

          public RegistryQuery getIdListQuery​(java.lang.String[] ivoids)
                                       throws java.net.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:
        `java.net.MalformedURLException`

    - #### getComponent

          public javax.swing.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​(java.awt.event.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​(java.awt.event.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