uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Epstein <eaepst...@gmail.com>
Subject Re: Serialize only one view of a CAS
Date Thu, 21 Oct 2010 12:52:11 GMT
Adding multiview support should not be hard. It took a couple hours to change
the CVD to support multiple views without ever seeing CVD code before.
Probably less work than getting a general view copy & name change working.
Note that the CasCopier implements a deep copy, which means that if a FS
in view 1 being copied references an annotation in another view 2 it will copy
view 2 as well.

Eddie

On Thu, Oct 21, 2010 at 7:44 AM, Jörn Kottmann <kottmann@gmail.com> wrote:
>  If only the Article view is copied, a new view of the same name is created
> in the new CAS, but it seems not be possible to copy the Article View to
> the _InitialView in the new CAS. Which I want to do, because otherwise
> the CAS cannot be opened in the Cas Editor (lacks multi view support).
>
> Is there a way doing this?
>
> Oterhwise the current copyCasView method could be extended
> with a new destination view name argument:
> public void copyCasView(CAS aSrcCasView, String dstViewName, boolean
> aCopySofa)
>
> The current copyCasView method would then simply call the extended one
> with the view name of the source view .
>
> Jörn
>
> On 10/20/10 4:09 PM, Eddie Epstein wrote:
>>
>> Hi Jörn,
>>
>> The only way to do this now is to create a 2nd CAS, copy over the
>> parts wanted using the org.apache.uima.util.CasCopier and serialize
>> the new CAS.
>>
>> A more direct solution is the proposal for serialization to support
>> "CAS projections".
>> A brief description is in
>>
>> https://cwiki.apache.org/UIMA/reducing-overhead-for-remote-service-calls.html
>>
>> Eddie
>>
>>
>> On Wed, Oct 20, 2010 at 6:35 AM, Jörn Kottmann<kottmann@gmail.com>  wrote:
>>>
>>>  Hi everyone,
>>>
>>> is it possible to only serialize one view of a CAS ?
>>>
>>> In my case the "_InitialView" contains an xml document, which
>>> is transformed by an AE into a plain text representation, and
>>> placed in a view called "Article".
>>> The serialization code now should only write the "Article"
>>> view into the xmi file, and dropping the "_InitialView".
>>>
>>> As far as I know the "_InitialView" must always exist,
>>> so it would be ok to just rename the "Article" view
>>> to "_InitialView" in the serialzed CAS.
>>>
>>> I looked at the XmiCasSerializer class but could not find
>>> a setting which specifies which views are serialized.
>>>
>>> Thanks,
>>> Jörn
>>>
>
>

Mime
View raw message