uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tong Fin <tong.f...@gmail.com>
Subject Re: Reuse serialized XMI CAS in a dynamic application.
Date Wed, 17 Jun 2009 01:29:23 GMT
Hi Kai,
I never use TypeSystem2Xml class.

But, I know that the following piece of code works for me.
Please give it a try and let us know.

        TypeSystemDescription tsDesc = TypeSystemUtil
.typeSystem2TypeSystemDescription (your_TypeSystem);
        FileOutputStream outTs;
        try {
            outTs = new FileOutputStream (fileName);
            tsDesc.toXML(outTs);
            outTs.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (SAXException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

-- Tong

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message