addDefaultProcess();
} else {
logger.info("Using custom clustering process: " + processResource);
controller.setComponentAutoload(true);
final ControllerHelper helper = new ControllerHelper();
final InputStream is = Thread.currentThread()
.getContextClassLoader().getResourceAsStream(processResource);
if (is != null) {
try {
final LocalComponentFactory nutchInputFactory = new LocalComponentFactory() {
public LocalComponent getInstance() {
return new NutchInputComponent(defaultLanguage);
}
};
controller.addLocalComponentFactory("input-nutch", nutchInputFactory);
final LocalProcess process = helper.loadProcess(
helper.getExtension(processResource), is).getProcess();
controller.addProcess(PROCESS_ID, process);
is.close();
} catch (IOException e) {
logger.error("Could not load process resource: " + processResource, e);
} catch (LoaderExtensionUnknownException e) {