Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 77362 invoked from network); 13 Jul 2007 09:11:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2007 09:11:37 -0000 Received: (qmail 63608 invoked by uid 500); 13 Jul 2007 09:11:40 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 63590 invoked by uid 500); 13 Jul 2007 09:11:40 -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 63581 invoked by uid 99); 13 Jul 2007 09:11:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 02:11:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of kanoyoshinobu@gmail.com designates 64.233.162.225 as permitted sender) Received: from [64.233.162.225] (HELO nz-out-0506.google.com) (64.233.162.225) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 02:11:36 -0700 Received: by nz-out-0506.google.com with SMTP id o37so363508nzf for ; Fri, 13 Jul 2007 02:11:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=kcitNsx2Z2J/grpO9sue0M/KtYs0SH77xfk+XjVc+iPcUDF7KIpYjW7e+38ny4nCiSMp6GKuF3PI1Pc5zgMXfLbLZg4zfL3vfBb62QYFJ0Qzb1fbaem078lYgX/jBB3C2Az8gRiiKnWz5+2aIW/nmobypBZHm05DwnZuv74EkDw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=MESF24UM2Wy/7x5ed0MTqu6/KKUggs0Ki6ZitcHGU78Vop3PvUNhNaIS8COORBmFNSP8chjTNbt+Gdf/j3YbHxA6Pl/zTayS6RKY7Qax4fWkOFLElaw8BptPOj91LIYeW/9IXmsVsyU7cg2RAMYQePQ5Awq2qYPwrzqaVZRV4U0= Received: by 10.141.209.7 with SMTP id l7mr429704rvq.1184317875407; Fri, 13 Jul 2007 02:11:15 -0700 (PDT) Received: by 10.141.210.3 with HTTP; Fri, 13 Jul 2007 02:11:15 -0700 (PDT) Message-ID: <2f7f092c0707130211q61952b65oa56bb78bfa6013ea@mail.gmail.com> Date: Fri, 13 Jul 2007 18:11:15 +0900 From: "Yoshinobu KANO" Reply-To: kano@is.s.u-tokyo.ac.jp Sender: kanoyoshinobu@gmail.com To: uima-user@incubator.apache.org Subject: Removal and addition of FS between views MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 995c49d77a866ebb X-Virus-Checked: Checked by ClamAV on apache.org Hi, (Excuse me if this is a duplicated post.) I tried the following code but got error " is over view "_InitialView" and cannot be added to indexes associated with the different view "created". at org.apache.uima.cas.impl.CASImpl.addFsToIndexes(CASImpl.java:3880) at org.apache.uima.jcas.impl.JCasImpl.addFsToIndexes(JCasImpl.java:1076) ... I checked the source code of UIMA but it seems that the removal of the FS was not made properly. My question is that: 1. Is it impossible to share FeatureStructures between multi-views in a single CAS? 2. If yes, then remove a FS from a view and add it to another view is also impossible? Thanks! -Yoshinobu Inside JCasAnnotatorImplBase with the multi-view settings: public void process(JCas aJCas) throws AnalysisEngineProcessException { TypeSystem typeSystem = aJCas.getTypeSystem(); try { JCas initialView = aJCas.getView("_InitialView"); JCas createdView = initialView.createView("created"); // JCas createdView = aJCas.createView("created"); FSIterator allIndexedFS = initialView.getFSIndexRepository().getAllIndexedFS(typeSystem.getTopType()); while (allIndexedFS.hasNext()) { TOP top = (TOP) allIndexedFS.next(); // I think it should work without removing... top.getView() may have returned illegal handle though it should be removed from indexes initialView.removeFsFromIndexes(top); // top.removeFromIndexes(); createdView.addFsToIndexes(top); } } } catch (CASException e) { e.printStackTrace(); } } -- Yoshinobu KANO kano@is.s.u-tokyo.ac.jp Tsujii Laboratory, the University of Tokyo http://www-tsujii.is.s.u-tokyo.ac.jp/