cpe);
// Crate CasInitializer and associate it with the CollectionReader
CpeDescriptorFactory.produceCollectionReaderCasInitializer(confLocation
+ "casinitializers/WFReaderInitializer.xml", cpe);
// Create CasProcessors
CpeCasProcessors processors = CpeDescriptorFactory.produceCasProcessors(2, 4, 3, cpe);
// Create Detag CasProcessor
CpeRemoteCasProcessor remoteProcessor = CpeDescriptorFactory
.produceRemoteCasProcessor("Detag Miner");
// CpeComponentDescriptor detagDesc =
// CpeDescriptorFactory.produceComponentDescriptor("c://cpm/annotators/wfminers/detag/service.xml");
remoteProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/service.xml"); // detagDesc);
remoteProcessor.addDeployParam("vnsPort", "9003");
remoteProcessor.addDeployParam("vnsHost", "localhost");
remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
remoteProcessor.setBatchSize(3);
remoteProcessor.setMaxErrorCount(50);
remoteProcessor.setMaxErrorSampleSize(500);
remoteProcessor.setActionOnMaxError("continue");
remoteProcessor.setMaxRestartCount(3);
remoteProcessor.setActionOnMaxRestart("continue");
remoteProcessor.setTimeout(5000);
remoteProcessor.setCasProcessorFilter("where Detag:DetagContent");
processors.addCpeCasProcessor(remoteProcessor);
// Create Detag CasProcessor
CpeLocalCasProcessor localProcessor = CpeDescriptorFactory.produceLocalCasProcessor(
"DupShingle Miner", "Detag:DetagContent");
localProcessor.setDescriptor("c://cpm/annotators/wfminers/detag/descriptor.xml");
localProcessor
.setExecutable("/home/cwiklik/cpm/wfcp/annotators/wfminers/detagger/bin/runDetagger.sh");
localProcessor.addDeployParam("Parm1", "Value1");
localProcessor.addDeployParam("vnsHost", "Host1");
localProcessor.addExecArg("-DVNS_HOST=127.0.0.1");
localProcessor.addExecArg("-DVNS_PORT=9904");
localProcessor.setCasProcessorFilter("where Detag:DetagContent");
localProcessor.setBatchSize(3);
localProcessor.setMaxErrorCount(50);
localProcessor.setMaxErrorSampleSize(500);
localProcessor.setActionOnMaxError("continue");
localProcessor.setMaxRestartCount(3);
localProcessor.setActionOnMaxRestart("continue");
localProcessor.setTimeout(5000);
processors.addCpeCasProcessor(localProcessor);
CpeIntegratedCasProcessor integratedProcessor = CpeDescriptorFactory
.produceCasProcessor("WF Writer");
integratedProcessor.setDescriptor(confLocation + "consumers/wf/store/descriptor.xml");
integratedProcessor.setBatchSize(100);
processors.addCpeCasProcessor(integratedProcessor);
CpeConfiguration config = CpeDescriptorFactory.produceCpeConfiguration(cpe);
CpeCheckpoint checkpoint = CpeDescriptorFactory.produceCpeCheckpoint();
checkpoint.setBatchSize(10);
checkpoint.setFilePath("c://cpm/data/checkpoint.dat");