code: public static void runPipeline(final CollectionReader reader,
        final AnalysisEngineDescription... descs) throws UIMAException, IOException {
      // Create AAE
      final AnalysisEngineDescription aaeDesc = createAggregateDescription(descs);
  
      // Instantiate AAE
      final AnalysisEngine aae = createAggregate(aaeDesc);
  
      // Create CAS from merged metadata
      final CAS cas = CasCreationUtils.createCas(asList(reader.getMetaData(), aae.getMetaData()));
      
      try {
        // Process
        while (reader.hasNext()) {
          reader.getNext(cas);
          aae.process(cas);
          cas.reset();
        }
        // Signal end of processing
        aae.collectionProcessComplete();
      }
      finally {
        // Destroy
        aae.destroy();
        destroy(reader);
      }
    }
docs: Run the CollectionReader and AnalysisEngines as a pipeline. After processing all CASes
  provided by the reader, the method calls {@link AnalysisEngine#collectionProcessComplete()
  collectionProcessComplete()} on the engines and {@link Resource#destroy() destroy()} on all
  engines.
  
  @param reader
  The CollectionReader that loads the documents into the CAS.
  @param descs
  Primitive AnalysisEngineDescriptions that process the CAS, in order. If you have a
  mix of primitive and aggregate engines, then please create the AnalysisEngines
  yourself and call the other runPipeline method.
  @throws UIMAException
  @throws IOException