org.datamanager.event
Class WebSearchRequestEvent
java.lang.Object
|
+--org.datamanager.event.DataManagerEventAdapter
|
+--org.datamanager.event.WebSearchRequestEvent
- All Implemented Interfaces:
- DataManagerEvent, EntityValue, RequestEvent, Serializable
- public class WebSearchRequestEvent
- extends DataManagerEventAdapter
- implements RequestEvent
This event is used to trigger a web search. It has a
number of constants that should be used as the value
of "engine" in this class' constructor.
- Author:
- Matthew Farrellee
- See Also:
- Serialized Form
Method Summary |
String |
getEngine()
Get a string representation of the search engine's
url that is used for this search event. |
String |
getKeywords()
Get the keywords used for this search event. |
String |
toString()
Get a String representation of this event. |
GOOGLE
public static final String GOOGLE
- See Also:
- Constant Field Values
DEJANEWS
public static final String DEJANEWS
- See Also:
- Constant Field Values
YAHOO
public static final String YAHOO
- See Also:
- Constant Field Values
LYCOS
public static final String LYCOS
- See Also:
- Constant Field Values
ALTAVISTA
public static final String ALTAVISTA
- See Also:
- Constant Field Values
WebSearchRequestEvent
public WebSearchRequestEvent(EventGenerator source,
String keywords)
- The non-search engine specific constructor.
This constructor uses GOOGLE as the default engine.
- Parameters:
source
- The source of the event.keywords
- The keywords with which to search.
WebSearchRequestEvent
public WebSearchRequestEvent(EventGenerator source,
String keywords,
String engine)
- The search engine specific consructor.
This constructor allows you to speficy which search
engine should be used in the search. The engine should
be one of the constants provided on this class.
- Parameters:
source
- The source of the event.keywords
- The keywords with which to search.engine
- The search engine to use for the search.
getEngine
public String getEngine()
- Get a string representation of the search engine's
url that is used for this search event.
getKeywords
public String getKeywords()
- Get the keywords used for this search event.
toString
public String toString()
- Get a String representation of this event.
- Specified by:
toString
in interface DataManagerEvent
- Specified by:
toString
in class DataManagerEventAdapter
See the Helium Website