Created
January 10, 2018 14:23
-
-
Save obxpete/86711b69729721204a3547f3ae90e4d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////// | |
// 1. crawler config | |
crawlerConfig = createObject("java", "com.norconex.collector.http.crawler.HttpCrawlerConfig"); | |
// straight test. does the default crawlerconfig have its appropriate methods. ? | |
//writeDump(crawlerConfig); //YES | |
urlsJavaArray = javaCast("string[]", [ | |
javaCast("string", "http://example1.com"), | |
javaCast("string", "http://example2.com") | |
] | |
); | |
crawlerConfig.setStartURLs(urlsJavaArray); | |
writeDump(crawlerConfig); /// yes, this has its methods | |
////////////////////// | |
// 2. crawler obj | |
crawlerObj = createObject("java", "com.norconex.collector.http.crawler.HttpCrawler").init(crawlerConfig); | |
writeDump(crawlerObj); /// yes, this has its methods | |
////////////////////// | |
// 3. collectorConfig | |
collectorConfig = createObject("java", "com.norconex.collector.http.HttpCollectorConfig"); | |
// this has no methods of its own. it shohave the 2. all it has are some fields. | |
writeDump(collectorConfig);abort; | |
collectorConfig.setCrawlerConfigs(crawlerConfig); | |
////////////////////// | |
//4 . collector | |
collector = createObject("java", "com.norconex.collector.http.HttpCollector").init(collectorConfig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment