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 voidaddEntryListener(java.awt.event.ActionListener listener)Adds a listener which will be notified when the user has entered a query.javax.swing.JComponentgetComponent()May return a component which the user can interact with to select a query.RegistryQuerygetIdListQuery(java.lang.String[] ivoids)Returns a registry query suitable for this query factory which queries a given list of IVO identifiers.RegistryQuerygetQuery()Returns the currently selected query.RegistrySelectorgetRegistrySelector()Returns the registry component object associated with this object.voidremoveEntryListener(java.awt.event.ActionListener listener)Removes a listener previously added byRegistryQueryFactory.addEntryListener(java.awt.event.ActionListener).
-
-
-
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:RegistryQueryFactoryReturns the currently selected query.- Specified by:
getQueryin interfaceRegistryQueryFactory- Returns:
- query object
- Throws:
java.net.MalformedURLException
-
getIdListQuery
public RegistryQuery getIdListQuery(java.lang.String[] ivoids) throws java.net.MalformedURLException
Description copied from interface:RegistryQueryFactoryReturns a registry query suitable for this query factory which queries a given list of IVO identifiers.- Specified by:
getIdListQueryin interfaceRegistryQueryFactory- 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:RegistryQueryFactoryMay 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:
getComponentin interfaceRegistryQueryFactory- Returns:
- GUI component for query selection, or null
-
addEntryListener
public void addEntryListener(java.awt.event.ActionListener listener)
Description copied from interface:RegistryQueryFactoryAdds a listener which will be notified when the user has entered a query.- Specified by:
addEntryListenerin interfaceRegistryQueryFactory- Parameters:
listener- listener
-
removeEntryListener
public void removeEntryListener(java.awt.event.ActionListener listener)
Description copied from interface:RegistryQueryFactoryRemoves a listener previously added byRegistryQueryFactory.addEntryListener(java.awt.event.ActionListener).- Specified by:
removeEntryListenerin interfaceRegistryQueryFactory- Parameters:
listener- listener
-
getRegistrySelector
public RegistrySelector getRegistrySelector()
Description copied from interface:RegistryQueryFactoryReturns the registry component object associated with this object.- Specified by:
getRegistrySelectorin interfaceRegistryQueryFactory- Returns:
- registry selector
-
-