dragon.onlinedb.searchengine
Class GoogleEngine

java.lang.Object
  |
  +--dragon.onlinedb.AbstractQuery
        |
        +--dragon.onlinedb.searchengine.AbstractSearchEngine
              |
              +--dragon.onlinedb.searchengine.GoogleEngine
All Implemented Interfaces:
ArticleQuery, CollectionReader

public class GoogleEngine
extends AbstractSearchEngine

Google Search Engine

Copyright: Copyright (c) 2003

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
 
Fields inherited from class dragon.onlinedb.searchengine.AbstractSearchEngine
arrUrl, defaultEncoding, parser, site, term
 
Fields inherited from class dragon.onlinedb.AbstractQuery
articleNum, curArticle, curArticleNo, curPageNo, curPageWidth, pageNum, pageWidth
 
Constructor Summary
GoogleEngine()
           
 
Method Summary
 boolean initQuery()
          One should call this method before retrieval articles.
 boolean moveToPage(int pageNo)
          Move to the given page and the pointer is set on the first article of the page.
 void setSearchTerm(java.lang.String term)
          Set the searching terms.
 
Methods inherited from class dragon.onlinedb.searchengine.AbstractSearchEngine
getArticle, getArticle, getArticleByKey, getAutoRefresh, getDefaultEncoding, getRemoveTagOption, getSiteRestriction, getSummaryOnlyOption, setAutoRefresh, setDefaultEncoding, setRemoveTagOption, setSiteRestriction, setSummaryOnlyOption, sleepManySeconds, sleepOneSecond, supportArticleKeyRetrieval
 
Methods inherited from class dragon.onlinedb.AbstractQuery
close, getArticle, getArticleKey, getArticleParser, getCurPageNo, getCurPageWidth, getNextArticle, getPageNum, getPageWidth, getTotalArticleNum, loadCollection, moveToArticle, moveToNextArticle, moveToNextPage, restart, setArticleParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleEngine

public GoogleEngine()
Method Detail

setSearchTerm

public void setSearchTerm(java.lang.String term)
Description copied from interface: ArticleQuery
Set the searching terms. How to interpret the terms specified in the string is subject to the implementations.

Specified by:
setSearchTerm in interface ArticleQuery
Overrides:
setSearchTerm in class AbstractSearchEngine

initQuery

public boolean initQuery()
Description copied from interface: ArticleQuery
One should call this method before retrieval articles. After initialization, number of pages and number of papers are available.

Returns:
a boolean value to indicate the operation is successful or failed.

moveToPage

public boolean moveToPage(int pageNo)
Description copied from interface: ArticleQuery
Move to the given page and the pointer is set on the first article of the page.

Parameters:
pageNo - the page #
Returns:
true if the given page exists.