CleartkMultiAnnotator extends JCasAnnotator_ImplBase implements
    Initializable { @Override public void collectionProcessComplete() throws AnalysisEngineProcessException { super.collectionProcessComplete(); if (this.isTraining()) { try { for (DataWriter<OUTCOME_TYPE> dataWriter : dataWriters.values()) { dataWriter.finish(); } } catch (CleartkProcessingException ctke) { throw new AnalysisEngineProcessException(ctke); } } }  @Override void initialize(UimaContext context); @Override void collectionProcessComplete(); static final String PARAM_CLASSIFIER_FACTORY_CLASS_NAME; static final String PARAM_DATA_WRITER_FACTORY_CLASS_NAME; static final String PARAM_IS_TRAINING; }
@Test public void testDescriptor() throws Exception { try { AnalysisEngineFactory.createEngine( StringTestAnnotator.class, CleartkMultiAnnotator.PARAM_DATA_WRITER_FACTORY_CLASS_NAME, DefaultStringTestDataWriterFactory.class.getName()); Assert.fail("expected exception with missing output directory"); } catch (ResourceInitializationException e) { } try { AnalysisEngineFactory.createEngine( StringTestAnnotator.class, DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY, outputDirectoryName); Assert.fail("expected exception with missing classifier jar"); } catch (ResourceInitializationException e) { } AnalysisEngine engine = AnalysisEngineFactory.createEngine( StringTestAnnotator.class, DefaultDataWriterFactory.PARAM_DATA_WRITER_CLASS_NAME, InstanceDataWriter.class.getName(), DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY, outputDirectoryName); Object outputDir = engine.getConfigParameterValue(DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY); Assert.assertEquals(outputDirectoryName, outputDir); engine.collectionProcessComplete(); }