You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by James Jichun Zhu <ji...@gmail.com> on 2015/08/20 22:24:40 UTC

A non-annotation type?

Hi, there:

I have always had a question about type system but kept forgetting to ask.

I want to define a type that does not need to be a sub type of the default
uima.tcas.Annotation class, because it does not really need to have a
(begin, end), for instance, and it does not need to be indexed.

A most common use case is for us to declare such a non-Annotation type so
we can assign objects of such type as features of other Annotation types.

How can I do it?

-- 
James

Re: A non-annotation type?

Posted by Richard Eckart de Castilho <re...@apache.org>.
If you want the type to be a kind of annotation, but not a text annotation (i.e. bound to a view/sofa), then inherit from AnnotationBase. Otherwise inherit from TOP.

Cheers,

-- Richard

On 20.08.2015, at 22:24, James Jichun Zhu <ji...@gmail.com> wrote:

> Hi, there:
> 
> I have always had a question about type system but kept forgetting to ask.
> 
> I want to define a type that does not need to be a sub type of the default
> uima.tcas.Annotation class, because it does not really need to have a
> (begin, end), for instance, and it does not need to be indexed.
> 
> A most common use case is for us to declare such a non-Annotation type so
> we can assign objects of such type as features of other Annotation types.
> 
> How can I do it?
> 
> -- 
> James