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 628A16431 for ; Thu, 16 Jun 2011 14:16:08 +0000 (UTC) Received: (qmail 65254 invoked by uid 500); 16 Jun 2011 14:16:08 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 65231 invoked by uid 500); 16 Jun 2011 14:16:08 -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 65221 invoked by uid 99); 16 Jun 2011 14:16:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:16:08 +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 69.93.243.6 as permitted sender) Received: from [69.93.243.6] (HELO gateway12.websitewelcome.com) (69.93.243.6) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 16 Jun 2011 14:15:59 +0000 Received: (qmail 1602 invoked from network); 16 Jun 2011 14:13:10 -0000 Received: from gator74.hostgator.com (184.173.199.208) by gateway12.websitewelcome.com with SMTP; 16 Jun 2011 14:13:10 -0000 Received: from [129.34.20.19] (port=25630 helo=[9.2.34.128]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1QXDMA-0000jy-Hi for user@uima.apache.org; Thu, 16 Jun 2011 09:15:38 -0500 Message-ID: <4DFA1009.4010401@schor.com> Date: Thu, 16 Jun 2011 10:15:37 -0400 From: Marshall Schor User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: XmiCasSerialization, XmiCasDeserialization and XmiSerializationSharedData References: In-Reply-To: X-Enigmail-Version: 1.1.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: yktgi01e0-s5.watson.ibm.com ([9.2.34.128]) [129.34.20.19]:25630 X-Source-Auth: msa+schor.com X-Email-Count: 1 X-Source-Cap: bWlzY2hvcjttaXNjaG9yO2dhdG9yNzQuaG9zdGdhdG9yLmNvbQ== Serialization / deserialization is supposed to return the same CAS :-) (but see exception below). The deserialization step *requires* that the CAS you deserialize into, is previously set up with the proper type system for the types in the serialized form. The *lenient* flag, if set, disables the error message you would normally get, if the serialized form has a type in it trying to be deserialized, but the CAS doesn't have that type defined. This allows you to deserialize just some subset of the types in the serialized form - namely those which are defined in the CAS's type system. ---------- Please check and confirm that you've set up the CAS you're deserializing into, with the type system containing all the types that may be in the serialized form. -Marshall On 6/15/2011 4:07 PM, Joel Dubbels wrote: > New user question about serialization. I would like to serialize my CAS > to disk and then later on, with a new program/invocation/whatever, I'd > like to deserialize the CAS and work with it. When I do just normal > serialization/deserialization I appear to be losing a lot of types from > the typesystem (provided I am doing lenient deserialization), which > results in a very empty CAS. I want exactly the same CAS as what I > serialized out.. It looked like I was able to successfully > serialize/deserialize when I used an XmiSerializationSharedData object > between serialize/deserialize. However, if I want to do the > deserialization in an different program/invocation/whatever from where I > did the serialization, how do I preserve the XmiSerializationSharedData > object that allows me to pick up all the types that I originally > serialized out. Ie. do I have to somehow preserve/serialize the > shareddata object (which seems silly and also not doable because it is not > a serializable object). I'm sure there must be a straightforward way to > do this. Anyone have an answer, or better yet, a good example? Thanks. > > Joel Dubbels > Watson Solution Development > Healthcare and Life Sciences Solution Development > Phone: 507-253-1165 > Internet:dubbels@us.ibm.com