Class DataTypesXmlMgr

  • public class DataTypesXmlMgr
    extends java.lang.Object
    This manager is responsible for reading and writing datatypes in XML.
    • Constructor Detail

      • DataTypesXmlMgr

        public DataTypesXmlMgr​(DataTypeManager dataManager,
                               MessageLog log)
        Constructs a new data types XML manager.
        dataManager - the data type manager to read from or write to
        log - the message log for recording datatype warnings
    • Method Detail

      • read

        public void read​(XmlPullParser parser,
                         TaskMonitor monitor)
                  throws org.xml.sax.SAXParseException,
        Reads the datatypes encoded in XML from the specified XML parser and recreates them in a datatype manager.
        parser - the XML parser
        monitor - the task monitor
        org.xml.sax.SAXParseException - if an XML parse error occurs
        CancelledException - if the user cancels the read operation
      • write

        public void write​(XmlWriter writer,
                          TaskMonitor monitor)
                   throws CancelledException
        Writes datatypes into XML using the specified XML writer.
        writer - the XML writer
        monitor - the task monitor
        CancelledException - if the user cancels the write operation
      • writeAsXMLForDebug

        public static void writeAsXMLForDebug​(DataTypeManager dataManager,
                                              java.lang.String outputFilename)
        Output data types in XML format for debugging purposes. NOTE: There is no support for reading the XML produced by this method.
        outputFilename - name of the output file
        Throws: - if there was a problem writing to the file