// ingestActionDeleteDataFile - crawler post-ingest action
// ingestionRootPath - prepend /data/ingest to this for full path
//
//
MetExtractorProductCrawler casCrawler = this
.configureCrawler(getServletContext().getInitParameter(
FM_URL));
casCrawler.setActionIds(Arrays.asList(req
.getParameterValues("ingestAction")));
String productRootPath = "/data/ingest/"
+ req.getParameter("ingestionRootPath");
casCrawler.setProductPath(productRootPath);
try {
casCrawler.setMetExtractor(req.getParameter("metext"));
} catch (Exception e) {
throw new ServletException(e.getMessage());
}
try {
casCrawler
.setMetExtractorConfig(req.getParameter("metextConfigFilePath"));
} catch (MetExtractionException e) {
throw new ServletException(e.getMessage());
}
// turn em' loose
casCrawler.crawl();
// now we should explicitly destroy various sessions for cleanup
HttpSession session = req.getSession();
session.removeAttribute("metextPrettyName");
session.removeAttribute("metext");