Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 88610 invoked from network); 31 Mar 2008 19:45:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 19:45:27 -0000 Received: (qmail 37361 invoked by uid 500); 31 Mar 2008 19:45:26 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 37342 invoked by uid 500); 31 Mar 2008 19:45:26 -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 37333 invoked by uid 99); 31 Mar 2008 19:45:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 12:45:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eaepstein@gmail.com designates 209.85.162.176 as permitted sender) Received: from [209.85.162.176] (HELO el-out-1112.google.com) (209.85.162.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 19:44:45 +0000 Received: by el-out-1112.google.com with SMTP id o28so570993ele.3 for ; Mon, 31 Mar 2008 12:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=W2gVMoZFy7E76Y0+fc/PaOuEwhVZ2jIF9aO4/iLDYnM=; b=co4Nxg3ac1HLbGFBo4KhFHVF6YRajGsEc7ERMnyDmpH21mpjuEtefIMr4KtzeqI1ee4s1iMiyfLawR8R3pVPc9ZWzM/oBM43oxZwrsxnEaKyxZtK/Q+8wGubD5ljPTfccyLvNujRDAPeVh+G58gUcixoOcQEWWkNSbPxn1pgB+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=X4Sx3bqNGEJuM0mNRiMVooeh2CHqDDoXwCNDDE8qRma9OHUxv5d2lz+UWr8cdEj80IBKY3fyrHA8DOeFNqnaQGJ2cARR1JgyMCMxONznP+n4fazXST2mDNvfRIXI5uHuXzJjIy0W5rJ/bEBWEkDxiG4yWcvU4TvOluSttH6vEtY= Received: by 10.115.32.1 with SMTP id k1mr10715071waj.107.1206992696165; Mon, 31 Mar 2008 12:44:56 -0700 (PDT) Received: by 10.114.154.6 with HTTP; Mon, 31 Mar 2008 12:44:56 -0700 (PDT) Message-ID: Date: Mon, 31 Mar 2008 15:44:56 -0400 From: "Eddie Epstein" To: uima-user@incubator.apache.org Subject: Re: Copying feature structures between views In-Reply-To: <47F11299.8090500@xrce.xerox.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5023_8931169.1206992696151" References: <47F11299.8090500@xrce.xerox.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5023_8931169.1206992696151 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Aaron, The low-level methods are used in CasCopier to allow all operations to proceed from the baseCAS. I agree with the recommendation to avoid using them to avoid having the code go bad in some future release. For a class that just copies from one view to another, you should be able to easily avoid the use of low-level methods. Note that one of the main features of this method, supporting deep copies with shared FS (FS that are referenced multiple times) may not be needed in your case. An FS in the CAS can be referenced from any view. Regards, Eddie On Mon, Mar 31, 2008 at 12:34 PM, Aaron Kaplan wrote: > I have a CAS with two views, and I want to copy certain annotations from > one view to the other, adjusting their offsets in the process. I looked > at org.apache.uima.util.CasCopier, but it doesn't quite do what I > want--it will only copy from a view in one base CAS to a view with the > same name in another base CAS. Using the source of CasCopier as a > model, I could easily write my own copying method, but I hesitate to do > so because it uses low-level methods that the javadocs warn are for > internal use only. Is there a better way to do this? > > -Aaron > ------=_Part_5023_8931169.1206992696151--