Yes, you are right, the CAS Reset is for an application, not for an annotator.

Is there any reason you can't do your work as an application?  It would seem to
"fit" there, better.

-Marshall

On 7/25/2011 11:32 AM, James Jichun Zhu wrote:
> Thanks, Burn. What I found was that the XMI files previous generated bears the
> sofa ID "_InitialView", and when I manually change it to a specific view name,
> I am able to extract the objects from the XMI file into the CAS underlying
> that specific view. So, you are probably right about "it re-creates a complete
> CAS matching the one that had been serialized".
>
> In reality, because I need to load objects from two XMI files into two
> separate collections, I cannot always manually update the XMI's sofa ID to two
> separate view names in order for them to be loaded into two separate CASes. So
> you are right again about loading them into the same CAS in two separate 
> steps.
>
> However, I ran into trouble on how to clear the CAS after deserializing the
> first XMI file. I tried the reset() method but it seems to be intended for
> application (not 100% sure what it means), not for being used internally
> within an analysis engine component. Any other ways to get it done?
>
> Really appreciate all the help here.
>
> James
>
>
> On 7/22/11 2:19 PM, Burn Lewis wrote:
>> XmiCasDeserialize operates on a CAS, not a View.  It re-creates a complete
>> CAS matching the one that had been serialized.  If you want to compare the
>> contents of two CASes (two XMI files) you'll have to deserialize them
>> one-by-one.  You could extract the information of interest from the 1st
>> before deserializing the 2nd file into the same CAS.
>>
>> Burn.
>>
>

Reply via email to