Class bdd.search.spider.URLStatus
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bdd.search.spider.URLStatus

java.lang.Object
   |
   +----bdd.search.spider.URLStatus

public class URLStatus
extends Object
Written by Tim Macinta 1997
Distributed under the GNU Public License (a copy of which is enclosed with the source).

This class holds information about the content at a particular URL. It can also be used to fetch and parse an URL.

Constructor Index

 o URLStatus(URL, File, EnginePrefs)
"url" is the location of the information and "temp_file" is the temporary file that can be used to store the contents of this url.

Method Index

 o dumpToDatabase(DataOutputStream)
Creates a database containing just this URL.
 o finalize()
Gets rid of the temporary file.
 o getCacheFile()
Returns the file that is used to cache the contents of this URL.
 o getLinkExtractor()
Returns a LinkExtractor that can handle this URL's mime type.
 o getWordExtractor()
Returns a WordExtractor that can handle this URL's mime type.
 o loaded()
Returns true if and only if this URL was loaded without an error.
 o mimeTypeUnderstood(String)
Returns true if and only if this mime type can be processed.
 o moved()
Returns true if and only if this URL causes a redirection.
 o readContent()
Downloads the content of the given URL and stores it in a temporary cache file.

Constructors

 o URLStatus
  public URLStatus(URL url,
                   File temp_file,
                   EnginePrefs eng_prefs)
"url" is the location of the information and "temp_file" is the temporary file that can be used to store the contents of this url.

Methods

 o loaded
  public boolean loaded()
Returns true if and only if this URL was loaded without an error.
 o dumpToDatabase
  public void dumpToDatabase(DataOutputStream out) throws IOException
Creates a database containing just this URL.
 o getWordExtractor
  public WordExtractor getWordExtractor() throws IOException
Returns a WordExtractor that can handle this URL's mime type. To add support for new mime types add a WordExtractor that handles those mime types here and add appropriate LinkExtractors to the getLinkExtractor() method. Also, add the mime type to the list in the mimeTypeUnderstood() method.
 o getLinkExtractor
  public LinkExtractor getLinkExtractor() throws IOException
Returns a LinkExtractor that can handle this URL's mime type. To add support for new mime types add a LinkExtractor that handles those mime types here and add appropriate WordExtractors to the getWordExtractor() method. Also, add the mime type to the list in the mimeTypeUnderstood() method.
 o mimeTypeUnderstood
  public boolean mimeTypeUnderstood(String mime_type)
Returns true if and only if this mime type can be processed.
 o getCacheFile
  public File getCacheFile()
Returns the file that is used to cache the contents of this URL.
 o readContent
  public void readContent()
Downloads the content of the given URL and stores it in a temporary cache file.
 o finalize
  public void finalize() throws Throwable
Gets rid of the temporary file.
Overrides:
finalize in class Object
 o moved
  public boolean moved()
Returns true if and only if this URL causes a redirection.

All Packages  Class Hierarchy  This Package  Previous  Next  Index