|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.erowid.sperowider.simple.SimpleSpiderModel
Interface to our data storage. The basic process is : 1. A found URL is proposed to the data store 2. If that found URL has already been proposed, it is discarded 3. If it has neither been proposed nor redirected to, it is added to the candidate list. OR 1. A new URL is requested from the data store 2. If that URL causes a redirect, the redirected-to URL is proposed to the data store 3. If that URL returns data, it is parsed
| Constructor Summary | |
SimpleSpiderModel()
Default constructor |
|
| Method Summary | |
void |
addFoundURL(String foundIn,
String found)
Proposes a URL for future parsing. |
void |
destroy()
Does nothing. |
List |
getFoundURLs(String sourceURL)
This method is not supported in this model. |
Collection |
getInvalidURLs()
Returns the set of invalid URLs |
List |
getSourceURLs(String foundURL)
This method is not supported in this model. |
int |
getSpiderQueueSize()
The number of URLs left in the queue. |
String |
getUnspideredUrl()
Returns a URL for parsing. |
boolean |
isSpiderMapSupported()
Returns false always, as getSourceURLs(String) and getFoundURLs(String)
are not supported in this model. |
void |
markInvalidURL(String givenURL,
int responseCode,
String message)
Marks a URL as bad |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleSpiderModel()
| Method Detail |
public void addFoundURL(String foundIn,
String found)
addFoundURL in interface ISimpleSpiderModelpublic String getUnspideredUrl()
getUnspideredUrl in interface ISimpleSpiderModelpublic int getSpiderQueueSize()
getSpiderQueueSize in interface ISimpleSpiderModelpublic void destroy()
destroy in interface ISimpleSpiderModel
public List getFoundURLs(String sourceURL)
throws UnsupportedOperationException
getFoundURLs in interface ISimpleSpiderModelUnsupportedOperationException - If the model does not support this method
public List getSourceURLs(String foundURL)
throws UnsupportedOperationException
getSourceURLs in interface ISimpleSpiderModelUnsupportedOperationException - If the model does not support this method
public void markInvalidURL(String givenURL,
int responseCode,
String message)
markInvalidURL in interface ISimpleSpiderModelpublic Collection getInvalidURLs()
getInvalidURLs in interface ISimpleSpiderModelpublic boolean isSpiderMapSupported()
getSourceURLs(String) and getFoundURLs(String)
are not supported in this model.
isSpiderMapSupported in interface ISimpleSpiderModel
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||