uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Epstein" <eaepst...@gmail.com>
Subject Re: Copying feature structures between views
Date Mon, 31 Mar 2008 19:44:56 GMT
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.


On Mon, Mar 31, 2008 at 12:34 PM, Aaron Kaplan <Aaron.Kaplan@xrce.xerox.com>

> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message