I ended up writing a set of helper methods for doing commonly used operations 
like returning a Java Iterator over a FSList, appending an item, finding the 
length, and converting a Collection to an FSList.  Since there is no common 
supertype for FSList, StringList, and the other list types I ended up having to 
duplicate the helper methods.  One thing I tried to do as much as possible in 
my helper methods was preserve or reuse EmptyFSList instances so 
the CAS wouldn't get cluttered with them.
 
Joon Chuah
Engineer
21st Century Technologies, Inc
4515 Seton Center Parkway Suite 320
Austin, TX 78759

Phone: 512 342 0010 x 307
Email: [EMAIL PROTECTED]
URL: http://www.21technologies.com <http://www.21technologies.com/> 

The information in this email and in any attachments is confidential and may be 
privleged.  If you are not the intended recipient, please destroy this message, 
delete any copies held on y our systems and notify the sender immediately.  You 
should not retain, copy or use this email for any purpose, nor disclose all or 
any part of its content to any other person. 
________________________________

From: Thomas Francart [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 21, 2007 11:01 AM
To: [email protected]
Subject: Using and iterating with FSList FSArray



Hi again UIMA gurus

Working with FSList and FSArray in UIMA type systems looks like a lot of fun... 
:

1. I just can't figure out a way to iterate over a FSList, or NonEmptyFSList... 
how can I iterate over a feature that is defined as an FSList ? I can't find 
anything describing this in the documentation anywhere.

2. Similarly, I can iterate over a FSArray, but it looks tedious to add 
elements into it (what should I do when the array exceeds it size ?) any 
example of how to do that ?

3. Can anyone provide any quick explanation about the objectives behind the 
design of the FSList class ? (at least, knowing WHY it is like that would help 
me to live with it...)

Btw, I have added the "improvement of FSArray and FSList" as a suggestion in 
the UIMA requirements/suggestions wiki.

Best
Thomas



-- 

Thomas Francart 
Mondeca 
3, cité Nollez 75018 Paris France 
Tel: +33 (0)1 44 92 35 04 - Fax: +33 (0)1 44 92 02 59 
Blog: mondeca.wordpress.com 
Web: www.mondeca.com 
Mail: [EMAIL PROTECTED] 

Reply via email to