com.google.soap.search
Class GoogleSearchResult

java.lang.Object
  |
  +--com.google.soap.search.GoogleSearchResult

public class GoogleSearchResult
extends java.lang.Object

GoogleSearchResult encapsulates the complete results returned by the Google Web APIs search call. Users of the API should only call the get methods on this object; the fields are filled in when a search result is returned.

See Also:
GoogleSearchResultElement, GoogleSearchDirectoryCategory

Constructor Summary
GoogleSearchResult()
           
 
Method Summary
 GoogleSearchDirectoryCategory[] getDirectoryCategories()
          Returns an array of directory categories for this result.
 boolean getDocumentFiltering()
          Returns true if and only if filtering was performed on the search results, which happens only if: (a) you requested filtering, and (b) filtering actually occurred.
 int getEndIndex()
          Returns the index (1-based) of the last search result in the result elements.
 int getEstimatedTotalResultsCount()
          Returns the estimated total number of results returned for the query.
 boolean getEstimateIsExact()
          Returns true if and only if the estimated number of results is exact.
 GoogleSearchResultElement[] getResultElements()
          Returns an array of result elements.
 java.lang.String getSearchComments()
          Returns string intended for display to an end user.
 java.lang.String getSearchQuery()
          Returns the query string that generated this result.
 double getSearchTime()
          Returns total server time to process the query (in seconds).
 java.lang.String getSearchTips()
          Returns a string intended for display to the end user; provides instructive suggestions on how to use Google.
 int getStartIndex()
          Returns the index (1-based) of the first search result in the result elements.
 void setDirectoryCategories(GoogleSearchDirectoryCategory[] cats)
           
 void setDocumentFiltering(boolean fi)
           
 void setEndIndex(int en)
           
 void setEstimatedTotalResultsCount(int m)
           
 void setEstimateIsExact(boolean xt)
           
 void setResultElements(GoogleSearchResultElement[] rs)
           
 void setSearchComments(java.lang.String ct)
           
 void setSearchQuery(java.lang.String q)
           
 void setSearchTime(double tm)
           
 void setSearchTips(java.lang.String tt)
           
 void setStartIndex(int sn)
           
 java.lang.String toString()
          Returns a nicely formatted representation of a Google search result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleSearchResult

public GoogleSearchResult()
Method Detail

setSearchTime

public void setSearchTime(double tm)

getSearchTime

public double getSearchTime()
Returns total server time to process the query (in seconds).

setSearchQuery

public void setSearchQuery(java.lang.String q)

getSearchQuery

public java.lang.String getSearchQuery()
Returns the query string that generated this result.

setSearchComments

public void setSearchComments(java.lang.String ct)

getSearchComments

public java.lang.String getSearchComments()
Returns string intended for display to an end user. One of the most common messages found here is a note that "stop words" were removed from the search automatically (this happens for very common words such as "and" and "as")

setSearchTips

public void setSearchTips(java.lang.String tt)

getSearchTips

public java.lang.String getSearchTips()
Returns a string intended for display to the end user; provides instructive suggestions on how to use Google.

setDirectoryCategories

public void setDirectoryCategories(GoogleSearchDirectoryCategory[] cats)

getDirectoryCategories

public GoogleSearchDirectoryCategory[] getDirectoryCategories()
Returns an array of directory categories for this result. to the ODP directory matches for this search.

setStartIndex

public void setStartIndex(int sn)

getStartIndex

public int getStartIndex()
Returns the index (1-based) of the first search result in the result elements.

setEndIndex

public void setEndIndex(int en)

getEndIndex

public int getEndIndex()
Returns the index (1-based) of the last search result in the result elements.

setEstimatedTotalResultsCount

public void setEstimatedTotalResultsCount(int m)

getEstimatedTotalResultsCount

public int getEstimatedTotalResultsCount()
Returns the estimated total number of results returned for the query. Note: The estimated number may be either too high or too low

setDocumentFiltering

public void setDocumentFiltering(boolean fi)

getDocumentFiltering

public boolean getDocumentFiltering()
Returns true if and only if filtering was performed on the search results, which happens only if: (a) you requested filtering, and (b) filtering actually occurred.

setEstimateIsExact

public void setEstimateIsExact(boolean xt)

getEstimateIsExact

public boolean getEstimateIsExact()
Returns true if and only if the estimated number of results is exact.

setResultElements

public void setResultElements(GoogleSearchResultElement[] rs)

getResultElements

public GoogleSearchResultElement[] getResultElements()
Returns an array of result elements. This corresponds to the actual list of search results.

toString

public java.lang.String toString()
Returns a nicely formatted representation of a Google search result.
Overrides:
toString in class java.lang.Object