[ 
https://issues.apache.org/jira/browse/UIMA-3969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113849#comment-14113849
 ] 

Marshall Schor commented on UIMA-3969:
--------------------------------------

While refactoring, I see there's a 0-overhead way to computationally know if 
feature structures have multiple references to them, independent of the setting 
of the <multipleReferencesAllowed> attribute on Features.  So we don't need 
that flag to tell if some Array or List is multiply referenced or not.  The 
existing code does this partially, already, and if it discovers a multiple 
reference to something that was being serialized as if it was not multiply 
referenced, it reports an error, and "truncates" the list (if it is a list); if 
it's an array, it loses the object sharing.

I'm planning on a *non-compatible* change to switch this to using the actual 
knowledge of whether or not an FS is shared.  This guarantees that correct 
serialization (all sharing preserved, regardless of the correct / incorrect use 
of the <multipleReferencesAllowed> flag.   This could cause some code that 
depended on the truncation, or upon the non-sharing (in the case of arrays) to 
now start to fail...  Please post a comment if you know of issues this might 
cause.



I'm thinking that if XmiCasSerialization is the only real use of this flag, 
then we could deprecate it.

> Add JSON Serialization for CASs and UIMA Descriptors
> ----------------------------------------------------
>
>                 Key: UIMA-3969
>                 URL: https://issues.apache.org/jira/browse/UIMA-3969
>             Project: UIMA
>          Issue Type: New Feature
>          Components: Core Java Framework
>    Affects Versions: 2.6.0SDK
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.6.1SDK
>
>
> Recent trends toward moving things into the cloud motivated me to consider 
> what a JSON serialization of the CAS and descriptor metadata (more 
> particularly, type systems) might look like.
> I've put up a Wiki page with some of the thoughts so far in this exploration, 
> here:  
> https://cwiki.apache.org/confluence/display/UIMA/JSON+serialization+for+UIMA
> I'm also fooling around with a proof-of-concept implementation, based on our 
> current XMI serialization for the CAS, as well as our MetaDataObject_impl 
> serialization for UIMA descriptors, in order to work out the details.  There 
> are additional nits (like how to configure things) not yet worked out.
> Comments and discussion appreciated; I've put this up as a Jira to record 
> them together - but feel free to use email also for any comments you feel 
> might be better being more ephemeral.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to