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 6925DD3ED for ; Tue, 14 Aug 2012 16:37:01 +0000 (UTC) Received: (qmail 83152 invoked by uid 500); 14 Aug 2012 16:37:01 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 83118 invoked by uid 500); 14 Aug 2012 16:37:01 -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 83108 invoked by uid 99); 14 Aug 2012 16:37:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 16:37:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.220.175] (HELO mail-vc0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 16:36:53 +0000 Received: by vcbfy27 with SMTP id fy27so528122vcb.6 for ; Tue, 14 Aug 2012 09:36:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=ncIkCSFFCsDtmUNGTT61d4kdfa3DPPPyLnDH7o0OMo8=; b=LbKGR1o76Ik+APZUlO8Fdr23igUSoWtEso4uykucJElBNu6xH+RAyOE0NVsLkxIscn zvoP+vkDu/IIJwokclUw1YGYwDOS10MamvT1LwpV6g27ks1xxlLFy3nnLyHizrTLJizg C7XgUD0RB3BkkNMa59uQgwO91ChoifvEOWZCYlCTXwUELjTqfaFrwDg8a+eDJRpDKp7U hEY/yqLWyk2+1zyA4GDGh3/B3VWwhF3rW9fgfeWDVhaTXrHXGg0K1yz1LvBomhMLXeB3 Jp4OyabbAkqSil8Vbk+jPVx7zDqMh9wyxlv7NLVddxkh0SyW8FiXSqj2XKec8EUZh1sO /gXQ== MIME-Version: 1.0 Received: by 10.220.152.67 with SMTP id f3mr11076307vcw.19.1344962192452; Tue, 14 Aug 2012 09:36:32 -0700 (PDT) Received: by 10.58.143.20 with HTTP; Tue, 14 Aug 2012 09:36:32 -0700 (PDT) X-Originating-IP: [137.53.240.162] In-Reply-To: References: Date: Tue, 14 Aug 2012 09:36:32 -0700 Message-ID: Subject: Re: A shared object graph between various views/sofas From: Shahim Essaid To: user@uima.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlXiKt07aU52BdUEcCOZVovAsfRlkFugSRt3OdFsCmK2vM4HvJEvzMCLsa8kJTC1J0wyLVn Yes, the idea of a global view is probably the best option. I initially thought that the getIndexRepository().getAllIndexedFS(SomeType) would allow me to access type instances independent of views (from the heaps you referred to) but that didn't work. Is there any public API access for getting an iterator over instances of a type directly from the heaps regardless of the current view? It seems that this type of access could be useful since a CAS is supposed to have something in common across the different views and it wouldn't be too inappropriate to allow for view independent type instances when needed. Shahim On Tue, Aug 14, 2012 at 6:53 AM, Eddie Epstein wrote: > A View, basically, is just an index and a sofa. All FS are stored > in the common CAS "heaps". > > The only mechanism for passing results from annotator-a to > annotator-b is by adding FS to an index. Annotators can > be view-unaware, in which case sofa-mapping is setup > to pass the correct View to the annotator. Or annotators can > be view-aware and they must have logic to know which views > to look for. > > Given that views are application specific, an app can create > a "global" view to index stuff. > > Eddie > > On Mon, Aug 13, 2012 at 4:08 PM, Shahim Essaid wrote: >> Thank you Eddie. So I can index a non-AnnotationBase FS in any view >> but the indexes are still view specific, correct? >> >> If "annotator-a" in view "view-a" creates a FS and there is a down >> stream "annotator-b" that operates in "view-b" and it needs to check >> for the existence of the same FS, how should "annotator-a" store it >> and how should "annotator-b" find it without them being aware of each >> others' views and indexes? Is there a global place (global index?) to >> store FS objects in a CAS if the indexes are view specific? >> >> Thanks, >> Shahim >> >> >> >> On Mon, Aug 13, 2012 at 12:07 PM, Eddie Epstein wrote: >>> Hi, >>> >>> All feature structures in a CAS are accessible from any view. >>> That is, an FS-reference can be to any FS in the CAS. >>> The only restriction is that an annotation FS can only be indexed >>> in the view containing the sofa referenced by the annotation. >>> >>> An FS type that is not derived from any annotation type >>> can be indexed in multiple views. So a "global graph" type >>> could be indexed in every view. >>> >>> Not sure which aspect of your question this answers, hopefully >>> something :) >>> >>> Eddie >>> >>> On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid wrote: >>>> Hi All, >>>> >>>> Is there a way for creating a single arbitrary object graph (of >>>> subtypes of Top) that is accessible from various CAS views? I have a >>>> possible use-case where I would like to reconstruct the "domain, >>>> world, situation, etc." that the various sofas are about. In this >>>> use-case, I would add annotations to specific sofas and indexes as >>>> usual but I would also like to add objects to this single shared >>>> object graph and relate the annotations and object to each other. >>>> >>>> I have not tried this yet but it might be possible to add an "IsAbout" >>>> annotation that spans the whole sofa and one of its features is a >>>> "situation" feature to a "Situation" object and then make sure that >>>> this situation object is also referred to from any newly created sofas >>>> and their corresponding "IsAbout" annotations. Would this work? Is >>>> there a better way for accomplishing this? >>>> >>>> Thank you, >>>> Shahim