Hi Eddie,
Indeed, the type system used for the de-serialization differs from the
one used for serialization.
In the process of serialization I am doing the following:
// serialize the cas
final ByteArrayOutputStream osCas = new
ByteArrayOutputStream();
XmiCasSerializer.serialize( cas.getCas(), osCas );
// serialize the type system
final ByteArrayOutputStream osTS = new ByteArrayOutputStream();
TypeSystemUtil.typeSystem2TypeSystemDescription(
cas.getTypeSystem() ).toXML( osTS );
In the type system, before serialization, I have the feature feature:
<featureDescription>
<name>hypernyms</name>
<description>List of hypernyms</description>
<rangeTypeName>uima.cas.ByteArray</rangeTypeName>
<multipleReferencesAllowed>true</multipleReferencesAllowed>
</featureDescription>
However, in the serialized version of the type system, the
"<multipleReferencesAllowed>true</multipleReferencesAllowed>" is missing
and this causes the problem...
<featureDescription>
<name>hypernyms</name>
<description/>
<rangeTypeName>uima.cas.ByteArray</rangeTypeName>
</featureDescription>
I have also other ByteArray features and the "multipleReferencesAllowed"
is missing for all of them in the serialized version.
Is this a bug or there is another way to serialize the type system, so
that the "multipleReferencesAllowed" is handled correctly?
greetings
Diman
On 09/21/2010 12:13 AM, Eddie Epstein wrote:
On Mon, Sep 20, 2010 at 9:50 AM, Eddie Epstein<[email protected]> wrote:
Hi Diman,
Indeed the problem is Xmi deserialization. It looks like ByteArray
features must be defined with
<multipleReferencesAllowed>true</multipleReferencesAllowed>
At first glance this is missing from our documentation. Will double check that.
In fact UIMA is working as designed. It appears that your XmiCas data
was serialized out with multipleReferencesAllowed=true for the feature
hypernyms, but then deserialized with a different typesystem where
multipleReferencesAllowed=false.
Eddie