ISSearch
Interface ISDBCrawlerInterface

All Superinterfaces:
ISCrawlerInterface, Runnable
All Known Implementing Classes:
ISDBCrawler

public interface ISDBCrawlerInterface
extends ISCrawlerInterface

Interface of the main Crawler class of the Web search engine. This class is used to start and stop the Crawler, to reset the engine and to control crawling parameters. Additionally, it provides the functionality to store crawled documents into the database using the built-in database interface block.


Field Summary
 
Fields inherited from interface ISSearch.ISCrawlerInterface
RUNNING, STOPPED
 
Method Summary
 void closeDB()
          Closes the database connection of the built-in database interface.
 ISDBinterface getDBInterface()
          Returns the built-in database interface of the crawler
 boolean openDB()
          Initializes the internal database interface and opens its database connection
 boolean store(URL link, ISDocumentInterface doc)
          Stores the crawled document and its URL into the database
 
Methods inherited from interface ISSearch.ISCrawlerInterface
addLink, getBest, getCrawlingDepth, getCurrentDocument, getCurrentURL, getMaxQueueSize, getQueueSize, getState, isVisited, reset, setCrawlingDepth, setQueueMaxSize, start, stop
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

store

public boolean store(URL link,
                     ISDocumentInterface doc)
Stores the crawled document and its URL into the database

Parameters:
link - the URL of the crawled document
doc - extracted terms and links from the document
Returns:
true, if the storage was successful; false otherwise.

openDB

public boolean openDB()
Initializes the internal database interface and opens its database connection

Returns:
true, if the connection to the database was successful, false otherwise.

closeDB

public void closeDB()
Closes the database connection of the built-in database interface.


getDBInterface

public ISDBinterface getDBInterface()
Returns the built-in database interface of the crawler

Returns:
the database interface of the crawler