|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.unika.aifb.rdf.crawler.CrawlConsole
CrawlConsole is intended as the only public class to be used by every application which needs to embed RDF Crawler functionality. If you are the "enduser" of RDF Crawler, you should not directly use any other classes from the package.
It initializes several main modules and keeps static references from these modules as well as implements public methods to interact with these modules. This class is responsible for RDF model export and for logging of all the actions taken by the crawler.
An overview of other classes in the RDF Crawler (if you decide to use or change them):
| Field Summary | |
Cache |
cache
Cache of mappings: URL-filepaths. |
java.lang.String |
CachePath
CachePath - absolute path where to store the cache map |
int |
capacity
How many threads in the ThreadPool Feel free to change this for optimum performance |
java.lang.String |
LogPath
LogPath - absolute path where to store the LOG file of the crawling process |
org.w3c.rdf.model.Model |
model
RDF model - we are building it from small pieces |
java.lang.String |
ModelPath
ModelPath - absolute path where to store the model of all the RDF facts |
ChannelPool |
pool
Thread pool - branches off 10 different threads |
int |
time
How many seconds to crawl. |
URIList |
urilist
"TODO-list" - all the URLs we have to crawl. |
| Constructor Summary | |
CrawlConsole(java.util.Vector uris,
java.util.Vector hostfilter,
int depth,
int time)
Initialize the crawler parameters uris String Vector of initial URIs to crawl to hostfilter String Vector of hosts we want to crawl (null, if we crawl everywhere) depth how deep we want to crawl (0, if we want just the given URIs) time how many seconds we wait until we break connections to nonresponding hosts |
|
| Method Summary | |
java.lang.String |
dumpModel()
Get the crawling results as a string |
static void |
main(java.lang.String[] args)
Used to call CrawlConsole from DOS command line. |
void |
saveModel(java.lang.String filepath)
Save the crawling results to a file RDFUtil.saveModel(...) does not work. |
void |
setCachePath(java.lang.String path)
Indicate the file where you want to store the cache |
void |
setLocalNamespace(java.lang.String url,
java.lang.String path)
Set a mapping of "url" - some RDF Namespace given by a Web address to a local file "path". |
void |
setLogPath(java.lang.String path)
Indicate the file where you want to store the LOG file |
void |
setModelPath(java.lang.String path)
Indicate the file where you want to store the RDF model |
void |
start()
Start Crawling. |
void |
writeResults()
Write out the results |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public URIList urilist
public Cache cache
public ChannelPool pool
public int time
public org.w3c.rdf.model.Model model
public final int capacity
public java.lang.String LogPath
public java.lang.String ModelPath
public java.lang.String CachePath
| Constructor Detail |
public CrawlConsole(java.util.Vector uris,
java.util.Vector hostfilter,
int depth,
int time)
Initialize the crawler parameters
| Method Detail |
public void setLogPath(java.lang.String path)
public void setModelPath(java.lang.String path)
public void setCachePath(java.lang.String path)
public void start()
throws java.lang.Exception
public void saveModel(java.lang.String filepath)
throws java.lang.Exception
public java.lang.String dumpModel()
throws java.lang.Exception
public void writeResults()
throws java.lang.Exception
public void setLocalNamespace(java.lang.String url,
java.lang.String path)
public static void main(java.lang.String[] args)
throws java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||