@Test public void testOtherViewUnaware() throws ResourceInitializationException, AnalysisEngineProcessException { AnalysisEngineDescription description = AnalysisEngineFactory.createEngineDescription( SofaUnawareAnnotator.class, typeSystemDescription); AnalysisEngine engine = AnalysisEngineFactory.createEngine(description, "myView"); Throwable thrown = catchThrowable(() -> { HideOutput hider = null; try { hider = new HideOutput(); engine.process(jCas); } finally { if (hider != null) { hider.restoreOutput(); } } }); assertThat(thrown) .as("Exception thrown when view does not exist") .hasRootCauseInstanceOf(CASRuntimeException.class) .hasStackTraceContaining("No sofaFS with name myView found"); }
@Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { createViewSafely(aJCas, viewName); }
ViewCreatorAnnotator extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { createViewSafely(aJCas, viewName); } }
ViewCreatorAnnotator extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { createViewSafely(aJCas, viewName); }  }
ViewCreatorAnnotator extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { createViewSafely(aJCas, viewName); }  @Override void process(final JCas aJCas); static JCas createViewSafely(final JCas aJCas, final String aViewName); }
ViewCreatorAnnotator extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { createViewSafely(aJCas, viewName); }  @Override void process(final JCas aJCas); static JCas createViewSafely(final JCas aJCas, final String aViewName); static final String PARAM_VIEW_NAME; }