bass.crawler
Class ErrorPageDistribution

java.lang.Object
  extended by bass.crawler.PageDistributon
      extended by bass.crawler.ErrorPageDistribution

public class ErrorPageDistribution
extends PageDistributon


Field Summary
(package private)  java.util.LinkedList<java.lang.Integer> errors
           
(package private)  java.util.Iterator<java.lang.Integer> page_it
           
(package private)  java.util.LinkedList<java.lang.Integer> pages
           
 
Fields inherited from class bass.crawler.PageDistributon
pageCount
 
Constructor Summary
ErrorPageDistribution(java.util.LinkedList<java.lang.Integer> pages)
           
 
Method Summary
 int getPage()
          returns current page count & increases count
 void setStatus(int pageNumber, boolean pageStatus)
          Using a boolean array to save the pages we already crawled and the ones with errors to check them later again
 void writeMissingPages(java.lang.String country)
          writes the missing pages to a text file
 
Methods inherited from class bass.crawler.PageDistributon
getCurrent, getPageCount, setPageCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pages

java.util.LinkedList<java.lang.Integer> pages

errors

java.util.LinkedList<java.lang.Integer> errors

page_it

java.util.Iterator<java.lang.Integer> page_it
Constructor Detail

ErrorPageDistribution

public ErrorPageDistribution(java.util.LinkedList<java.lang.Integer> pages)
Method Detail

getPage

public int getPage()
Description copied from class: PageDistributon
returns current page count & increases count

Overrides:
getPage in class PageDistributon
Returns:
current page count, if max page count is reached -1 is returned

setStatus

public void setStatus(int pageNumber,
                      boolean pageStatus)
Description copied from class: PageDistributon
Using a boolean array to save the pages we already crawled and the ones with errors to check them later again

Overrides:
setStatus in class PageDistributon

writeMissingPages

public void writeMissingPages(java.lang.String country)
Description copied from class: PageDistributon
writes the missing pages to a text file

Overrides:
writeMissingPages in class PageDistributon
Parameters:
country - current country (will be included in filename) filename = missing_pages_.txt