Skip to content
Neo Anderson edited this page Apr 22, 2015 · 1 revision

##Class SupremeCrawlerFilter

Package - edu.usc.cssl.nlputils.plugins.supremeCrawler.process

###Constructor Summary #####SupremCrawlerFilter(String crawlUrl) Description
Sets the URL to crawl

###Method Summary #####List<String> filters(String segment) Parameters - A String containing value "terms" or "cases"
Returns - A List of Strings representing all the available terms or cases in the OYEZ Website.

Description
SupremeCrawlerFilter is used to populate the dropdown items in SupremeGUI, so that the users can specify the search criteria for the crawler.

##Class SupremeCrawler

Package - edu.usc.cssl.nlputils.plugins.supremeCrawler.process

###Constructor Summary #####SupremeCrawler(String filter, String outputDir,String crawlUrl) Description
Sets the filter criteria, output directory path and the URL to crawl

###Method Summary

#####void run() Description
For implementing Runnable interface. Calls looper()

#####void looper() Description
For each page in the search result, calls crawl()

#####void crawl(String url) Parameters - Url of the search results to parse
Description
Calls getFiles function for each link in the current results page.

#####void getFiles(String contenturl, String filename) Parameters - contenturl is the page to extract the contents from, which will be saved as <filename>.mp3 and <filename>-transcript.txt

Description
Extracts the audio file and transcript from the given url

#####void terminate() Description
Sets the boolean flag terminate to True, which will terminate the crawling in a graceful manner.

#####void appendLog(String message) Description
Appends the log to the console in the part org.eclipse.e4.ide.partstackdisplay of the main application. Internally calls the append function of the imported class edu.usc.cssl.nlputils.utilities.Log

Clone this wiki locally