Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 86564 invoked from network); 30 Jul 2007 13:18:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 13:18:15 -0000 Received: (qmail 29839 invoked by uid 500); 30 Jul 2007 13:18:08 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 29821 invoked by uid 500); 30 Jul 2007 13:18:08 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 29798 invoked by uid 99); 30 Jul 2007 13:18:08 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 06:18:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mcampbell@syrres.com designates 209.2.183.11 as permitted sender) Received: from [209.2.183.11] (HELO gaius.syrres.com) (209.2.183.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 13:18:03 +0000 X-Nonspoof-Check: 20040304 Message-ID: <46ADE4F5.9090608@syrres.com> Date: Mon, 30 Jul 2007 09:17:41 -0400 From: Matthew Campbell Reply-To: uima-user@incubator.apache.org User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: AnnotationIndex tree() References: <46AA6909.8030602@syrres.com> In-Reply-To: <46AA6909.8030602@syrres.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Actually...I may have put my foot in my mouth on Friday concerning DocumentAnnotation containing only one child annotation. The bug in the AnnotationIndexImpl addChildredn() method may still be an issue though. Sorry for the confusion. -Matt Matthew Campbell wrote: > Hey folks: > > I was just wondering if anyone else was having any luck with the > tree() method in AnnotationIndexImpl. I've been walking through it > with the debugger and believe that the child subiterator in > addChildren() never gets pushed to the next annotation, so we get > stuck in the while loop. I changed the while loop to the code below > and it gets through fine: > > while (it.hasNext()) { > annot = (AnnotationFS) it.next(); > dtr = new AnnotationTreeNodeImpl(); > dtr.set(annot); > node.addChild(dtr); > addChildren(dtr, subiterator(annot)); > } > > On a somewhat unrelated note, I'm basically trying to make a tree > of all the annotations in the document, so I'm passing in the > DocumentAnnotation into the tree function. Is there a reason the > DocumentAnnotation only has one child via a subiterator (which is a > SourceDocumentInformation annotation)? I assumed that since it's > range covers the entire document's length and is the first annotation > in the index, a subiterator on this annotation would iterate over all > of the strict unambiguous annotations in the document. Thanks in > advance for the help - I've only been working with UIMA for a few > weeks now so I'm still getting my head around everything, but it's a > great tool. > > > > -Matt >