@Test public void testAddAnnotation() throws Exception { ExampleAnnotator annotator = new ExampleAnnotator(); LeoAEDescriptor ae = new LeoAEDescriptor(); ae.addType(WordToken.class.getCanonicalName(), "Word Token", "uima.tcas.Annotation"); CAS c = CasCreationUtils.createCas(ae.getAnalysisEngineDescription()); Annotation a = annotator.addOutputAnnotation(WordToken.class.getCanonicalName(), c.getJCas(), 1, 2); assertNotNull(a); assertEquals(c.getAnnotationIndex().iterator().get(), a); }
protected Annotation addOutputAnnotation(String outputType, JCas cas, int begin, int end) throws AnalysisEngineProcessException { return this.addOutputAnnotation(outputType, cas, begin, end, null); }
LeoBaseAnnotator extends JCasAnnotator_ImplBase implements LeoAnnotator { protected Annotation addOutputAnnotation(String outputType, JCas cas, int begin, int end) throws AnalysisEngineProcessException { return this.addOutputAnnotation(outputType, cas, begin, end, null); } }
LeoBaseAnnotator extends JCasAnnotator_ImplBase implements LeoAnnotator { protected Annotation addOutputAnnotation(String outputType, JCas cas, int begin, int end) throws AnalysisEngineProcessException { return this.addOutputAnnotation(outputType, cas, begin, end, null); } LeoBaseAnnotator();  LeoBaseAnnotator(String outputType, String...inputTypes); }
LeoBaseAnnotator extends JCasAnnotator_ImplBase implements LeoAnnotator { protected Annotation addOutputAnnotation(String outputType, JCas cas, int begin, int end) throws AnalysisEngineProcessException { return this.addOutputAnnotation(outputType, cas, begin, end, null); } LeoBaseAnnotator();  LeoBaseAnnotator(String outputType, String...inputTypes); String[] getInputTypes(); T setInputTypes(String...inputTypes); String getOutputType(); T setOutputType(String outputType); int getNumInstances(); T setNumInstances(int numInstances); String getName(); T setName(String name); String[] getIncludeTypesFilter(); T setIncludeTypesFilter(String...includeTypesFilterNames); String[] getExcludeTypesFilter(); T setExcludeTypesFilter(String...excludeTypesFilterNames); @Override void initialize(UimaContext aContext); InputStream getResourceAsInputStream(String resourcePath); String getResourceFileAsString(String resourcePath); long getNumberOfCASesProcessed(); T resetNumberOfCASesProcessed(); long getNumberOfFilteredCASesProcessed(); T resetNumberOfFilteredCASesProcessed(); @Override final void process(JCas aJCas); abstract void annotate(JCas aJCas); @Override void collectionProcessComplete(); LeoDelegate getDescriptor(); LeoAEDescriptor getLeoAEDescriptor(); LeoTypeSystemDescription getLeoTypeSystemDescription(); T addLeoTypeSystemDescription(LeoTypeSystemDescription typeSystemDescription); T setLeoTypeSystemDescription(LeoTypeSystemDescription typeSystemDescription); }
LeoBaseAnnotator extends JCasAnnotator_ImplBase implements LeoAnnotator { protected Annotation addOutputAnnotation(String outputType, JCas cas, int begin, int end) throws AnalysisEngineProcessException { return this.addOutputAnnotation(outputType, cas, begin, end, null); } LeoBaseAnnotator();  LeoBaseAnnotator(String outputType, String...inputTypes); String[] getInputTypes(); T setInputTypes(String...inputTypes); String getOutputType(); T setOutputType(String outputType); int getNumInstances(); T setNumInstances(int numInstances); String getName(); T setName(String name); String[] getIncludeTypesFilter(); T setIncludeTypesFilter(String...includeTypesFilterNames); String[] getExcludeTypesFilter(); T setExcludeTypesFilter(String...excludeTypesFilterNames); @Override void initialize(UimaContext aContext); InputStream getResourceAsInputStream(String resourcePath); String getResourceFileAsString(String resourcePath); long getNumberOfCASesProcessed(); T resetNumberOfCASesProcessed(); long getNumberOfFilteredCASesProcessed(); T resetNumberOfFilteredCASesProcessed(); @Override final void process(JCas aJCas); abstract void annotate(JCas aJCas); @Override void collectionProcessComplete(); LeoDelegate getDescriptor(); LeoAEDescriptor getLeoAEDescriptor(); LeoTypeSystemDescription getLeoTypeSystemDescription(); T addLeoTypeSystemDescription(LeoTypeSystemDescription typeSystemDescription); T setLeoTypeSystemDescription(LeoTypeSystemDescription typeSystemDescription);  }