uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: UIMA Feature
Date Mon, 30 Sep 2013 07:41:12 GMT
> FSArray<Y>, Y = ElementList = FSArray<X>, X = TOP

Mind, my example is not exactly what is written here. 

Y = ElementList = FSArray<X>

would may look like ElementList inherits from FSArray and just binds the generic
variable X. However, the FSArray<X> is actually a feature in ElementList. That
is because it is not possible to inherit from FSArray.

Cheers,

-- Richard

On 30.09.2013, at 09:35, Richard Eckart de Castilho <rec@apache.org> wrote:

> That's an interesting question. This should work:
> 
> Create a type: 
> 
> ElementList {
>  FSArray<TOP> elements;
> }
> 
> In the type where you want to create the ArrayList<ArrayList> feature,
> add a this:
> 
> … {
>  FSArray<ElementList> elements;
> }
> 
> When you say ArrayList<ArrayList>, this can also be written as
> 
> ArrayList<ArrayList> -> 
> ArrayList<ArrayList<X>>, X = Object ->
> ArrayList<Y>, Y = ArrayList<X>, X = Object
> 
> In Java, this Y can be anonymous, but in UIMA, afaik we need to make it
> explicit. Mind there is no "Object" in UIMA, the equivalent is "TOP":
> 
> FSArray<Y>, Y = ElementList = FSArray<X>, X = TOP
> 
> You should be able to replace FSArray with FSList if you prefer that.
> 
> -- Richard
> 
> On 30.09.2013, at 06:33, harshal patni <patni.harshal@gmail.com> wrote:
> 
>> Hi,
>>  I am trying to create a feature within my TypeSystemDescriptor. I would
>> like to create a feature of type ArrayList<ArrayList> "ArrayList of
>> Arraylist". Is it possible to create this feature? How would we do that?
>> 
>> Harshal
> 


Mime
View raw message