ws.qe
Class Google

java.lang.Object
  extended byws.qe.Google

public class Google
extends java.lang.Object

This class gets access to Google and gets a given number of URLs as search results for a query.

This class and its method are only to be called in the download module "Module I".

The implemention of this class is supported by Google Web APIs, for more information please see Google Web APIs Service ( javadoc ).

Author:
Sinian Zhang
See Also:
QueryExpansion, Tools.WebTextTokenStem(String[], String, String, String, String)

Constructor Summary
Google()
           
 
Method Summary
static java.lang.String[] getURLsList(javax.swing.JDialog stopDialog, java.lang.String query, int numOfWebsites)
          This method is to be called only in "Module I", it gets Google to search for websites according to the given query, saves a given number of URLs as results in a list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Google

public Google()
Method Detail

getURLsList

public static java.lang.String[] getURLsList(javax.swing.JDialog stopDialog,
                                             java.lang.String query,
                                             int numOfWebsites)
                                      throws java.io.IOException,
                                             com.google.soap.search.GoogleSearchFault
This method is to be called only in "Module I", it gets Google to search for websites according to the given query, saves a given number of URLs as results in a list.

Parameters:
stopDialog - The "Stop"-dialog.
query - An English word, which is delievered by "Word"-inputfield.
numOfWebsites - The number of search results(URLs), it is the same number delivered by "Web"-box.
Returns:
A list of URLs.
Throws:
java.io.IOException
com.google.soap.search.GoogleSearchFault
See Also:
com.google.soap.search.GoogleSearch