edu.columbia.cs.cg.prdualrank.searchengine.downloader
Class Downloader
java.lang.Object
edu.columbia.cs.cg.prdualrank.searchengine.downloader.Downloader
- All Implemented Interfaces:
- java.lang.Runnable
public class Downloader
- extends java.lang.Object
- implements java.lang.Runnable
This class is used for our implementation of:
"Searching Patterns for Relation Extraction over the Web: Rediscovering the Pattern-Relation Duality" . Y. Fang and K. C.-C. Chang. In WSDM, pages 825-834, 2011.
For further information, WSDM 2011 Conference Website .
Description
Runnable class used to download documents from the web. It stores the specified URL in a Map together with its content.
It will try ATTEMPTS times to retrieve in case previous searches are unsuccessful, waiting TIME_INTERVAL*ATTEMPTS everytime before trying again.
There are two time outs set for the connection: Read and Connection. This value is given in milliseconds in: TIME_OUT.
- Since:
- 2011-10-07
- Version:
- 0.1
- Author:
- Pablo Barrio, Goncalo Simoes
- See Also:
- WSDM 2011 Conference Website
Constructor Summary |
Downloader(java.net.URL url,
java.util.Map<java.net.URL,java.lang.String> documentsContent)
Instantiates a new downloader using the url to be downloaded and the map where to store the results or null in case connection is not established. |
Method Summary |
void |
run()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Downloader
public Downloader(java.net.URL url,
java.util.Map<java.net.URL,java.lang.String> documentsContent)
- Instantiates a new downloader using the url to be downloaded and the map where to store the results or null in case connection is not established.
- Parameters:
url
- the urldocumentsContent
- the documents content
run
public void run()
- Specified by:
run
in interface java.lang.Runnable