Hi there,

This is how I am doing the XMI deserialization:

                // deserialize the type system
final XMLInputSource xmlIn = new XMLInputSource( new ByteArrayInputStream( ( byte[] ) someObejct ), null ); final TypeSystemDescription tsDesc = UIMAFramework.getXMLParser().parseTypeSystemDescription( xmlIn );

                // deserialize the CAS
final CAS cas = CasCreationUtils.createCas( tsDesc, null, null );

XmiCasDeserializer.deserialize( new ByteArrayInputStream( ( byte[] ) someOtherObject ), cas, false );

                return cas;

It is important to de-serialize the type system as well.

greetings
Diman

On 12/19/2010 10:35 PM, Timur wrote:
need to convert UIMA XMI File to UIMA CAS. Please point me in
the right direction.

I am trying to do:

XmiCasDeserializer.deserialize (InputStream, CAS)

The Problem is i can't create an empty CAS that doesn't give me
a NullPointer Exception.


Reply via email to