import org.wamblee.crawler.kiss.guide.TimeInterval;
import org.wamblee.crawler.kiss.notification.NotificationException;
import org.wamblee.crawler.kiss.notification.Notifier;
+import org.wamblee.xml.ClasspathUriResolver;
+import org.wamblee.xml.XslTransformer;
/**
* The KiSS crawler for automatic recording of interesting TV shows.
try {
HttpClient client = new HttpClient();
// client.getHostConfiguration().setProxy("127.0.0.1", 3128);
+
+ XslTransformer transformer = new XslTransformer(new ClasspathUriResolver());
- Crawler crawler = createCrawler(aCrawlerConfig, client);
+ Crawler crawler = createCrawler(aCrawlerConfig, client, transformer);
InputStream programConfigFile = new FileInputStream(new File(
aProgramConfig));
- ProgramConfigurationParser parser = new ProgramConfigurationParser();
+ ProgramConfigurationParser parser = new ProgramConfigurationParser(transformer);
parser.parse(programConfigFile);
List<ProgramFilter> programFilters = parser.getFilters();
* In case configuration files cannot be found.
*/
private Crawler createCrawler(String aCrawlerConfig,
- HttpClient aClient) throws FileNotFoundException {
- ConfigurationParser parser = new ConfigurationParser();
+ HttpClient aClient, XslTransformer aTransformer) throws FileNotFoundException {
+ ConfigurationParser parser = new ConfigurationParser(aTransformer);
InputStream crawlerConfigFile = new FileInputStream(new File(
aCrawlerConfig));
Configuration config = parser.parse(crawlerConfigFile);