You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2006/11/21 13:42:22 UTC
updates to v2 doc for appl & annotator tutorial
Hi Adam -
I'm editing / correcting the v2 doc to correspond better to what is
implemented :-) . The doc said:
Annotators are not required to extend from the
JTextAnnotator_ImplBase class; they may instead directly implement the
JTextAnnotator interface, and provide all method implementations
themselves. This allows you to have your
annotator inherit from some other superclass if necessary. If you would
like to
do this, see the JavaDocs for JTextAnnotator for descriptions of the methods
you must implement.
I'm changing JTextAnnotator_ImplBase to JCasAnnotator_ImplBase, because
of the Javadoc comments
indicating that JTextAnnotator_ImplBase is now outmoded (still works -
for backwards
compatibility, but new stuff should use the new approach).
The rest of the paragraph - about implementing an "interface" - is there
an interface to implement in the v2 design?
JCasAnnotator_ImplBase is an abstract class, and doesn't implement an
interface.
-Marshall
Re: updates to v2 doc for appl & annotator tutorial
Posted by Adam Lally <al...@alum.rpi.edu>.
On 11/21/06, Marshall Schor <ms...@schor.com> wrote:
> I'm changing JTextAnnotator_ImplBase to JCasAnnotator_ImplBase, because
> of the Javadoc comments
> indicating that JTextAnnotator_ImplBase is now outmoded (still works -
> for backwards
> compatibility, but new stuff should use the new approach).
>
> The rest of the paragraph - about implementing an "interface" - is there
> an interface to implement in the v2 design?
> JCasAnnotator_ImplBase is an abstract class, and doesn't implement an
> interface.
>
The interface is called AnalysisComponent. JCasAnnotator_ImplBase
does implement it, transitively.
Note that AnalysisComponent is not specific to JCAS. There is a
method getRequiredCasInterface() which the user would have to
implement to return JCas.class. The in the process(AbstractCas cas)
method, they should typecas cas to type JCas.
-Adam