CleartkSequenceAnnotator extends JCasAnnotator_ImplBase implements Initializable { protected boolean isTraining() { return this.primitiveIsTraining; }  @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 testIsTraining() throws Throwable { StringTestAnnotator annotator = new StringTestAnnotator(); assertFalse(annotator.isTraining()); annotator.initialize(UimaContextFactory.createUimaContext( CleartkSequenceAnnotator.PARAM_DATA_WRITER_FACTORY_CLASS_NAME, StringDataWriter.class.getName())); assertTrue(annotator.isTraining()); annotator.initialize(UimaContextFactory.createUimaContext( CleartkSequenceAnnotator.PARAM_DATA_WRITER_FACTORY_CLASS_NAME, StringDataWriter.class.getName(), CleartkSequenceAnnotator.PARAM_CLASSIFIER_FACTORY_CLASS_NAME, StringTestClassifierFactory.class.getName(), CleartkSequenceAnnotator.PARAM_IS_TRAINING, false)); assertFalse(annotator.isTraining()); annotator.initialize(UimaContextFactory.createUimaContext( CleartkSequenceAnnotator.PARAM_DATA_WRITER_FACTORY_CLASS_NAME, StringDataWriter.class.getName(), CleartkSequenceAnnotator.PARAM_CLASSIFIER_FACTORY_CLASS_NAME, StringTestClassifierFactory.class.getName(), CleartkSequenceAnnotator.PARAM_IS_TRAINING, true)); assertTrue(annotator.isTraining()); }