|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.erowid.sperowider.BasicSperowiderModel
An in-memory implementation of ISperowiderModel.
| Constructor Summary | |
BasicSperowiderModel()
|
|
| Method Summary | |
void |
addFileToRectificationQueue(String fileName)
Adds a filename to the rectification queue |
void |
addFoundURL(String foundIn,
String found,
boolean excludeFromDownloadQueue)
The Downloader calls this when it finds a URL in a downloaded page. |
void |
destroy()
Called by the Sperowider to close all open resources |
String |
getFileForRectifying()
Returns a file to be rectified; this will be done after the downloads are all done |
String |
getFileNameForURL(String url)
Returns the filename for a mapped URL. |
List |
getFoundURLs(String sourceURL)
This is too expensive for the BasicSperowiderModel, in terms of memory. |
int |
getGrabbedUrlCount()
The count of URLs that have been grabbed for download. |
int |
getInvalidURLCount()
The count of all bad URLs, both found and real. |
Collection |
getInvalidURLs()
Returns the list of invalid URLs |
String |
getRealURLForFoundURL(String foundURL)
Returns the mapping data as set by mapFoundURLToRealURL(String, String) |
int |
getRectifiedHTMLFileCount()
The count of all HTML files that have been "rectified", that have been processed to replace all found URLs with relative URLs to the mapped file names. |
List |
getSourceURLs(String foundURL)
This is too expensive for the BasicSperowiderModel, in terms of memory. |
int |
getUncheckedUrlCount()
A count of URLs that have not yet been checked. |
int |
getUnRectifiedFileCount()
The count of downloaded HTML files that are not yet rectified. |
String |
getUnspideredUrl()
Returns a URL that has yet to be downloaded |
boolean |
grabForSpidering(String url)
If this URL has already been downloaded, return false. |
void |
init(Element configNode)
Initiale this class with the passed in XML configuration element. |
boolean |
isSpiderMapSupported()
Returns false, because the BasicSperowiderModel does not support getFoundURLs(String)
or getSourceURLs(String). |
void |
mapFoundURLToRealURL(String foundURL,
String realURL)
Maps a found URL to a "real URL". |
void |
mapRealURLToFileName(String realURL,
String fileName)
Maps a "real" URL to a file name. |
void |
markInvalidURL(String url,
int http_code,
String http_message)
Mark a URL as invalid |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicSperowiderModel()
| Method Detail |
public void addFoundURL(String foundIn,
String found,
boolean excludeFromDownloadQueue)
ISperowiderModel
addFoundURL in interface ISperowiderModelpublic String getUnspideredUrl()
ISperowiderModel
getUnspideredUrl in interface ISperowiderModel
public void mapFoundURLToRealURL(String foundURL,
String realURL)
ISperowiderModel
mapFoundURLToRealURL in interface ISperowiderModel
public void mapRealURLToFileName(String realURL,
String fileName)
ISperowiderModel
mapRealURLToFileName in interface ISperowiderModelpublic void addFileToRectificationQueue(String fileName)
ISperowiderModel
addFileToRectificationQueue in interface ISperowiderModelpublic boolean grabForSpidering(String url)
ISperowiderModel
grabForSpidering in interface ISperowiderModel
public void markInvalidURL(String url,
int http_code,
String http_message)
ISperowiderModel
markInvalidURL in interface ISperowiderModelpublic String getFileForRectifying()
ISperowiderModel
getFileForRectifying in interface ISperowiderModelpublic String getRealURLForFoundURL(String foundURL)
ISperowiderModelISperowiderModel.mapFoundURLToRealURL(String, String)
getRealURLForFoundURL in interface ISperowiderModelpublic String getFileNameForURL(String url)
ISperowiderModel
getFileNameForURL in interface ISperowiderModel
public void init(Element configNode)
throws SperowiderInstantiationException
IInitializableObject
init in interface IInitializableObjectSperowiderInstantiationExceptionpublic void destroy()
ISperowiderModel
destroy in interface ISperowiderModel
public List getFoundURLs(String sourceURL)
throws UnsupportedOperationException
UnsupportedOperationException, and returns false for
isSpiderMapSupported()
getFoundURLs in interface ISperowiderModelUnsupportedOperationException - If the model does not support this method
public List getSourceURLs(String foundURL)
throws UnsupportedOperationException
UnsupportedOperationException, and returns false for
isSpiderMapSupported()
getSourceURLs in interface ISperowiderModelUnsupportedOperationException - If the model does not support this methodpublic boolean isSpiderMapSupported()
getFoundURLs(String)
or getSourceURLs(String).
isSpiderMapSupported in interface ISperowiderModelpublic Collection getInvalidURLs()
getInvalidURLs in interface ISperowiderModelpublic int getGrabbedUrlCount()
ISperowiderModel
getGrabbedUrlCount in interface ISperowiderModelpublic int getInvalidURLCount()
ISperowiderModel
getInvalidURLCount in interface ISperowiderModelpublic int getRectifiedHTMLFileCount()
ISperowiderModel
getRectifiedHTMLFileCount in interface ISperowiderModelpublic int getUncheckedUrlCount()
ISperowiderModel
getUncheckedUrlCount in interface ISperowiderModelpublic int getUnRectifiedFileCount()
ISperowiderModel
getUnRectifiedFileCount in interface ISperowiderModel
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||