// build a Collection Processing Engine descriptor that will drive processing
CpeDescription cpeDesc = CpeDescriptorFactory.produceDescriptor();
// add collection reader that will read input docs
cpeDesc.addCollectionReader(FileSystemCollectionReader.getDescriptorURL().toString());
// specify configuration parameters for collection reader
CasProcessorConfigurationParameterSettings crSettings = CpeDescriptorFactory
.produceCasProcessorConfigurationParameterSettings();
CpeCollectionReader cpeCollRdr = cpeDesc.getAllCollectionCollectionReaders()[0];
cpeCollRdr.setConfigurationParameterSettings(crSettings);