|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 ISimpleSpiderModel
public String getUnspideredUrl()
getUnspideredUrl
in interface ISimpleSpiderModel
public int getSpiderQueueSize()
getSpiderQueueSize
in interface ISimpleSpiderModel
public void destroy()
destroy
in interface ISimpleSpiderModel
public List getFoundURLs(String sourceURL) throws UnsupportedOperationException
getFoundURLs
in interface ISimpleSpiderModel
UnsupportedOperationException
- If the model does not support this methodpublic List getSourceURLs(String foundURL) throws UnsupportedOperationException
getSourceURLs
in interface ISimpleSpiderModel
UnsupportedOperationException
- If the model does not support this methodpublic void markInvalidURL(String givenURL, int responseCode, String message)
markInvalidURL
in interface ISimpleSpiderModel
public Collection getInvalidURLs()
getInvalidURLs
in interface ISimpleSpiderModel
public 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 |