Class XmlCasSerializer


  • public abstract class XmlCasSerializer
    extends java.lang.Object
    This class is an older class with just two static methods which forward to methods in XmiCasSerializer. Consider using XmiCasSerializer or CasIOUtils instead. Serializes a CAS to inline XML format. The output format conforms to the XML Metadata Interchange (XMI) format, an OMG standard.

    For more options, see XmiCasSerializer.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void serialize​(CAS aCAS, java.io.OutputStream aStream)
      Serializes a CAS to XMI format and writes it to an output stream.
      static void serialize​(CAS aCAS, TypeSystem aTargetTypeSystem, java.io.OutputStream aStream)
      Serializes a CAS to XMI format and writes it to an output stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XmlCasSerializer

        public XmlCasSerializer()
    • Method Detail

      • serialize

        public static void serialize​(CAS aCAS,
                                     java.io.OutputStream aStream)
                              throws org.xml.sax.SAXException,
                                     java.io.IOException
        Serializes a CAS to XMI format and writes it to an output stream.
        Parameters:
        aCAS - CAS to serialize.
        aStream - output stream to which to write the XMI document
        Throws:
        org.xml.sax.SAXException - if a problem occurs during XMI serialization
        java.io.IOException - if an I/O failure occurs
      • serialize

        public static void serialize​(CAS aCAS,
                                     TypeSystem aTargetTypeSystem,
                                     java.io.OutputStream aStream)
                              throws org.xml.sax.SAXException,
                                     java.io.IOException
        Serializes a CAS to XMI format and writes it to an output stream. Allows a TypeSystem to be specified, to which the produced XMI will conform. Any types or features not in the target type system will not be serialized.
        Parameters:
        aCAS - CAS to serialize.
        aTargetTypeSystem - type system to which the produced XMI will conform. Any types or features not in the target type system will not be serialized.
        aStream - output stream to which to write the XMI document
        Throws:
        org.xml.sax.SAXException - if a problem occurs during XMI serialization
        java.io.IOException - if an I/O failure occurs