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

Field Summary
static String ALTAVISTA
           
static String DEJANEWS
           
static String GOOGLE
           
static String LYCOS
           
static String YAHOO
           
 
Fields inherited from class org.datamanager.event.DataManagerEventAdapter
source, time
 
Constructor Summary
WebSearchRequestEvent(EventGenerator source, String keywords)
          The non-search engine specific constructor.
WebSearchRequestEvent(EventGenerator source, String keywords, String engine)
          The search engine specific consructor.
 
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.
 
Methods inherited from class org.datamanager.event.DataManagerEventAdapter
getSource, getTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.datamanager.event.DataManagerEvent
getSource, getTime
 

Field Detail

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

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.
Method Detail

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