Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB9F910245 for ; Thu, 11 Jul 2013 21:52:58 +0000 (UTC) Received: (qmail 26702 invoked by uid 500); 11 Jul 2013 21:52:58 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 26659 invoked by uid 500); 11 Jul 2013 21:52:58 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 26651 invoked by uid 99); 11 Jul 2013 21:52:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 21:52:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msa@schor.com designates 67.18.22.68 as permitted sender) Received: from [67.18.22.68] (HELO gateway09.websitewelcome.com) (67.18.22.68) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 21:52:51 +0000 Received: by gateway09.websitewelcome.com (Postfix, from userid 507) id 1188DB1D60320; Thu, 11 Jul 2013 16:51:48 -0500 (CDT) Received: from gator74.hostgator.com (gator74.hostgator.com [184.173.199.208]) by gateway09.websitewelcome.com (Postfix) with ESMTP id A3BB1B1D601D3 for ; Thu, 11 Jul 2013 16:51:47 -0500 (CDT) Received: from [129.34.20.23] (port=52203 helo=[9.2.211.72]) by gator74.hostgator.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1UxOms-00011V-7Y for user@uima.apache.org; Thu, 11 Jul 2013 16:52:30 -0500 Message-ID: <51DF291B.6080405@schor.com> Date: Thu, 11 Jul 2013 17:52:27 -0400 From: Marshall Schor User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: Iterator through the Annotations in a CAS References: <1373491724.77398.YahooMailNeo@web120606.mail.ne1.yahoo.com> In-Reply-To: <1373491724.77398.YahooMailNeo@web120606.mail.ne1.yahoo.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator74.hostgator.com X-AntiAbuse: Original Domain - uima.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([9.2.211.72]) [129.34.20.23]:52203 X-Source-Auth: msa+schor.com X-Email-Count: 1 X-Source-Cap: bWlzY2hvcjttaXNjaG9yO2dhdG9yNzQuaG9zdGdhdG9yLmNvbQ== X-Virus-Checked: Checked by ClamAV on apache.org On 7/10/2013 5:28 PM, GATE User wrote: > I am writing the EntityProcessComplete(CAS, EntityProcessStatus) part of the callback listener to be fed to a UIMA client. I want to interate through all the view, sofas, and annotations in the CAS that is returned. > > I use cas.getViewIterator() and interate through all the views. For each few, I extract the sofafs with view.getSofa(). How would I get all annotations associated with that view and iterate over them? Do I use cas.getAnnotationIndex().iterator and cast each AnnotationFS as an Annotation? Yes. > With this method, am I only accessing the annotations associated with a view? Yes. > Thanks in advance. There is also a method on the index repository to get an iterator over all indexed Feature Structures - see getAllIndexedFS. This would pick up indexed FS's that were not subtypes of Annotation. This is also specific to one view. HTH. -Marshall