spider.crawl
Class History

java.lang.Object
  |
  +--spider.crawl.History

public class History
extends java.lang.Object

helps to maintain history of a crawl with timestamps

Author:
Gautam Pant

Nested Class Summary
 class History.HistoryElement
          inner class to record history data
 
Constructor Summary
History()
           
 
Method Summary
 boolean add(java.lang.String url, java.lang.String filename, double score)
          add into history
 java.lang.String getFileName(java.lang.String url)
          returns filename that stores the history file
 double getFileScore(java.lang.String url)
          returns score for a given url
 java.util.Hashtable getHistory()
          Returns the ht.
 History.HistoryElement getHistoryElement(java.lang.String url)
          return HistoryElement for a given url
 boolean isInHistory(java.lang.String url)
          find if a url is in history
 int size()
          find the size of history (pages crawled)
 boolean toFile(java.lang.String filename)
          put the history into a file after sorting by time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

History

public History()
Method Detail

add

public boolean add(java.lang.String url,
                   java.lang.String filename,
                   double score)
add into history


size

public int size()
find the size of history (pages crawled)


isInHistory

public boolean isInHistory(java.lang.String url)
find if a url is in history


getFileName

public java.lang.String getFileName(java.lang.String url)
returns filename that stores the history file


getFileScore

public double getFileScore(java.lang.String url)
returns score for a given url


getHistoryElement

public History.HistoryElement getHistoryElement(java.lang.String url)
return HistoryElement for a given url


toFile

public boolean toFile(java.lang.String filename)
put the history into a file after sorting by time


getHistory

public java.util.Hashtable getHistory()
Returns the ht.

Returns:
Hashtable