Ejemplo n.º 1
0
        public void test_XMLOutputStream_CharacterReference()
        {
            OStringStream   oss    = new OStringStream();
            XMLOutputStream stream = new  XMLOutputStream(oss, "", false);

            stream.startElement("testcr");
            stream.writeAttribute("chars", "one");
            stream.writeAttribute("amp", "&");
            stream.writeAttribute("deccr", "¨");
            stream.writeAttribute("hexcr", "¨");
            stream.writeAttribute("lhexcr", "¨");
            stream.writeAttribute("nodeccr1", "&#01688");
            stream.writeAttribute("nodeccr2", "&#;");
            stream.writeAttribute("nodeccr3", "&#00a8;");
            stream.writeAttribute("nodeccr4", "&#00A8;");
            stream.writeAttribute("nohexcr1", "&#x;");
            stream.writeAttribute("nohexcr2", "&#xABCD");
            stream.endElement("testcr");
            string expected = "<testcr chars=\"one\" amp=\"&amp;\" deccr=\"&#0168;\" hexcr=\"&#x00a8;\" " +
                              "lhexcr=\"&#x00A8;\" nodeccr1=\"&amp;#01688\" nodeccr2=\"&amp;#;\" " +
                              "nodeccr3=\"&amp;#00a8;\" nodeccr4=\"&amp;#00A8;\" " +
                              "nohexcr1=\"&amp;#x;\" nohexcr2=\"&amp;#xABCD\"/>";
            string s = oss.str();

            assertTrue((expected == s));
            stream = null;
        }
Ejemplo n.º 2
0
        public void test_XMLOutputStream_startEnd()
        {
            OStringStream   oss    = new OStringStream();
            XMLOutputStream stream = new  XMLOutputStream(oss, "", false);

            assertTrue(stream != null);
            stream.startEndElement("id");
            string str = oss.str();

            assertTrue(("<id/>" == str));
            stream = null;
        }
Ejemplo n.º 3
0
        public void test_XMLOutputStream_createStringWithProgramInfo()
        {
            string          expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
            OStringStream   oss      = new OStringStream();
            XMLOutputStream stream   = new  XMLOutputStream(oss, "UTF-8", true, "", "");

            assertTrue(stream != null);
            string str = oss.str();

            assertTrue((expected == str));
            stream = null;
        }
Ejemplo n.º 4
0
        public void test_XMLOutputStream_Elements()
        {
            double          d      = 2.4;
            long            l      = 123456789;
            long            ui     = 5;
            int             i      = -3;
            OStringStream   oss    = new OStringStream();
            XMLOutputStream stream = new  XMLOutputStream(oss, "", false);

            stream.startElement("fred");
            stream.writeAttribute("chars", "two");
            stream.writeAttribute("bool", true);
            stream.writeAttribute("double", d);
            stream.writeAttribute("long", l);
            stream.writeAttribute("uint", ui);
            stream.writeAttribute("int", i);
            stream.endElement("fred");
            string expected = "<fred chars=\"two\" bool=\"true\" double=\"2.4\" long=\"123456789\" uint=\"5\" int=\"-3\"/>";
            string s        = oss.str();

            assertTrue((expected == s));
            stream = null;
        }
Ejemplo n.º 5
0
        public void test_XMLOutputStream_PredefinedEntity()
        {
            OStringStream   oss    = new OStringStream();
            XMLOutputStream stream = new  XMLOutputStream(oss, "", false);

            stream.startElement("testpde");
            stream.writeAttribute("amp", "&");
            stream.writeAttribute("apos", "'");
            stream.writeAttribute("gt", ">");
            stream.writeAttribute("lt", "<");
            stream.writeAttribute("quot", "\"");
            stream.writeAttribute("pdeamp", "&amp;");
            stream.writeAttribute("pdeapos", "&apos;");
            stream.writeAttribute("pdegt", "&gt;");
            stream.writeAttribute("pdelt", "&lt;");
            stream.writeAttribute("pdequot", "&quot;");
            stream.endElement("testpde");
            string expected = "<testpde amp=\"&amp;\" apos=\"&apos;\" gt=\"&gt;\" lt=\"&lt;\" " +
                              "quot=\"&quot;\" pdeamp=\"&amp;\" pdeapos=\"&apos;\" pdegt=\"&gt;\" " + "pdelt=\"&lt;\" pdequot=\"&quot;\"/>";
            string s = oss.str();

            assertTrue((expected == s));
            stream = null;
        }
Ejemplo n.º 6
0
        public static int Main(string[] args)
        {
            int            retval = 0;
            SBMLNamespaces sbmlns = new SBMLNamespaces(3, 1, "comp", 1);

            // create the document
            SBMLDocument document = new SBMLDocument(sbmlns);

            // create the Model
            Model model = document.createModel();

            // create a replacement parameter
            Parameter parameter = model.createParameter();

            parameter.setId("x");
            parameter.setConstant(true);

            // create a parameter to be a conversion factor
            Parameter param2 = model.createParameter();

            param2.setId("x_conv");
            param2.setMetaId("_110013");
            param2.setConstant(true);

            // create a parameter to be a conversion factor
            Parameter param3 = model.createParameter();

            param3.setId("lcf");
            param3.setConstant(true);

            // Convert parameter to the plugin version so we can add the new attributes and replacements to it.
            CompSBasePlugin splugin = (CompSBasePlugin)(parameter.getPlugin("comp"));

            // Add a replaced element.
            ReplacedElement rep1 = splugin.createReplacedElement();
            int             rv   = rep1.setSubmodelRef("submod1");

            rv = rep1.setConversionFactor("x_conv");
            rv = rep1.setIdRef("param1");

            // Add a second replaced element in a different way.
            ReplacedElement rep2 = new ReplacedElement();

            rv = rep2.setSubmodelRef("submod2");
            rv = rep2.setDeletion("del1");
            rv = splugin.addReplacedElement(rep2);

            //Now create a replaced element that points into a submodel.
            rep2.unsetDeletion();
            rep2.setIdRef("submod2");
            SBaseRef sbr5 = rep2.createSBaseRef();

            sbr5.setIdRef("submodelG");
            SBaseRef sbr6 = sbr5.createSBaseRef();

            sbr6.setIdRef("buriedElement");
            splugin.addReplacedElement(rep2);


            // Create a submodel
            CompModelPlugin        mplugin = (CompModelPlugin)(model.getPlugin("comp"));
            CompSBMLDocumentPlugin compdoc = (CompSBMLDocumentPlugin)(document.getPlugin("comp"));

            compdoc.setRequired(true);

            ModelDefinition moddef1 = compdoc.createModelDefinition();

            moddef1.setId("Mod1");
            Parameter m1param1 = moddef1.createParameter();

            m1param1.setId("param1");
            m1param1.setConstant(true);
            Parameter m1param2 = moddef1.createParameter();

            m1param2.setId("param2");
            m1param2.setConstant(false);
            m1param2.setValue(3.2);

            ModelDefinition moddef2 = new ModelDefinition();

            moddef2.setId("Mod2");
            Parameter subparam2 = moddef2.createParameter();

            subparam2.setId("subparam2");
            subparam2.setConstant(false);
            compdoc.addModelDefinition(moddef2);


            ExternalModelDefinition extmod1 = compdoc.createExternalModelDefinition();

            extmod1.setId("ExtMod1");
            extmod1.setSource("urn:miriam:biomodels.db:BIOMD0000000127");

            ExternalModelDefinition extmod2 = new ExternalModelDefinition();

            extmod2.setId("ExtMod2");
            extmod2.setSource("otherfile.xml");
            extmod2.setModelRef("modelnamethere");
            extmod2.setMd5("406022s908ge74sklj");
            compdoc.addExternalModelDefinition(extmod2);

            Submodel submod1 = mplugin.createSubmodel();

            submod1.setId("submod1");
            submod1.setModelRef("Mod1");
            Deletion del1 = submod1.createDeletion();

            del1.setId("deletionA");
            del1.setIdRef("param2");

            Submodel submod2 = new Submodel();

            submod2.setId("submod2");
            submod2.setModelRef("ExtMod1");
            submod2.setSubstanceConversionFactor("subcf");
            submod2.setTimeConversionFactor("tcf");
            submod2.setExtentConversionFactor("xtf");
            Deletion del2 = new Deletion();

            del2.setId("deletionB");
            del2.setMetaIdRef("_0010110");
            rv = submod2.addDeletion(del2);
            del2.setId("deletionC");
            del2.unsetMetaIdRef();
            del2.setPortRef("port2");
            rv = submod2.addDeletion(del2);
            del2.unsetId();
            del2.unsetPortRef();
            del2.setUnitRef("mph");
            rv = submod2.addDeletion(del2);
            del2.unsetUnitRef();
            del2.setIdRef("submodG");
            SBaseRef sbr = del2.createSBaseRef();

            sbr.setIdRef("element5");
            rv = submod2.addDeletion(del2);
            Deletion del3 = new Deletion();

            del3.setIdRef("submodG");
            SBaseRef sbr2 = new SBaseRef();

            sbr2.setIdRef("subsubmodQ");
            SBaseRef subsbr = sbr2.createSBaseRef();

            subsbr.setPortRef("toBdel");
            del3.setSBaseRef(sbr2);
            submod2.addDeletion(del3);
            mplugin.addSubmodel(submod2);

            Port port1 = mplugin.createPort();

            port1.setId("port1");
            port1.setMetaIdRef("_110013");
            Port port2 = new Port();

            port2.setId("port2");
            port2.setIdRef("x");
            mplugin.addPort(port2);
            port2.setId("port3");
            port2.setIdRef("submod2");
            port2.setSBaseRef(sbr2);
            mplugin.addPort(port2);

            libsbml.writeSBMLToFile(document, "comp_example1.xml");
            document = libsbml.readSBMLFromFile("comp_example1.xml");
            if (document == null)
            {
                Console.WriteLine("Error reading back in file.");
                retval = -1;
            }
            else
            {
                document.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, false);
                document.checkConsistency();
                if (document.getErrorLog().getNumFailsWithSeverity(2) > 0 ||
                    document.getErrorLog().getNumFailsWithSeverity(3) > 0)
                {
                    OStringStream stream = new OStringStream();
                    document.printErrors(stream);
                    Console.WriteLine("Errors encoutered when round-tripping  SBML file: \n" +
                                      stream.str());
                    retval = -1;
                }
                libsbml.writeSBMLToFile(document, "comp_example1_rt.xml");
            }

            return(retval);
        }
Ejemplo n.º 7
0
        private static int Main(string[] args)
        {
            var retval = 0;
            var sbmlns = new SBMLNamespaces(3, 1, "comp", 1);

            // create the document
            var document = new SBMLDocument(sbmlns);

            //Define the external model definition
            var compdoc = (CompSBMLDocumentPlugin)(document.getPlugin("comp"));

            compdoc.setRequired(true);
            var extmod = compdoc.createExternalModelDefinition();

            extmod.setId("ExtMod1");
            extmod.setSource("enzyme_model.xml");
            extmod.setModelRef("enzyme");

            //Define the 'simple' model
            var mod1 = compdoc.createModelDefinition();

            mod1.setId("simple");
            var comp = mod1.createCompartment();

            comp.setSpatialDimensions(3);
            comp.setConstant(true);
            comp.setId("comp");
            comp.setSize(1L);

            var spec = new Species(sbmlns);

            //We have to construct it this way because we get the comp plugin from it later.
            spec.setCompartment("comp");
            spec.setHasOnlySubstanceUnits(false);
            spec.setConstant(false);
            spec.setBoundaryCondition(false);
            spec.setId("S");
            spec.setInitialConcentration(5);
            mod1.addSpecies(spec);
            spec.setId("D");
            spec.setInitialConcentration(10);
            mod1.addSpecies(spec);

            var rxn = new Reaction(3, 1);

            rxn.setReversible(true);
            rxn.setFast(false);
            rxn.setId("J0");

            var sr = new SpeciesReference(3, 1);

            sr.setConstant(true);
            sr.setStoichiometry(1);
            sr.setSpecies("S");
            rxn.addReactant(sr);
            sr.setSpecies("D");
            rxn.addProduct(sr);

            mod1.addReaction(rxn);

            var mod1plug = (CompModelPlugin)(mod1.getPlugin("comp"));
            var port     = new Port();

            port.setId("S_port");
            port.setIdRef("S");
            mod1plug.addPort(port);

            var port2 = mod1plug.createPort();

            port2.setId("D_port");
            port2.setIdRef("D");

            port.setId("comp_port");
            port.setIdRef("comp");
            mod1plug.addPort(port);

            port.setId("J0_port");
            port.setIdRef("J0");
            mod1plug.addPort(port);

            // create the Model
            var model = document.createModel();

            model.setId("complexified");

            // Set the submodels
            var mplugin = (CompModelPlugin)(model.getPlugin("comp"));
            var submod1 = mplugin.createSubmodel();

            submod1.setId("A");
            submod1.setModelRef("ExtMod1");
            var submod2 = mplugin.createSubmodel();

            submod2.setId("B");
            submod2.setModelRef("simple");
            var del = submod2.createDeletion();

            del.setPortRef("J0_port");

            // Synchronize the compartments
            var mcomp = model.createCompartment();

            mcomp.setSpatialDimensions(3);
            mcomp.setConstant(true);
            mcomp.setId("comp");
            mcomp.setSize(1L);
            var compartplug = (CompSBasePlugin)(mcomp.getPlugin("comp"));
            var re          = new ReplacedElement();

            re.setIdRef("comp");
            re.setSubmodelRef("A");
            compartplug.addReplacedElement(re);
            re.setSubmodelRef("B");
            re.unsetIdRef();
            re.setPortRef("comp_port");
            compartplug.addReplacedElement(re);

            //Synchronize the species
            spec.setId("S");
            spec.setInitialConcentration(5);
            var specplug = (CompSBasePlugin)(spec.getPlugin("comp"));
            var sre      = specplug.createReplacedElement();

            sre.setSubmodelRef("A");
            sre.setIdRef("S");
            var sre2 = specplug.createReplacedElement();

            sre2.setSubmodelRef("B");
            sre2.setPortRef("S_port");
            model.addSpecies(spec);

            spec.setId("D");
            spec.setInitialConcentration(10);
            sre.setIdRef("D");
            sre2.setPortRef("D_port");
            model.addSpecies(spec);

            libsbml.writeSBMLToFile(document, "spec_example3.xml");
            document = libsbml.readSBMLFromFile("spec_example3.xml");
            if (document == null)
            {
                Console.WriteLine("Error reading back in file.");

                retval = -1;
            }
            else
            {
                document.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, false);
                document.checkConsistency();
                if (document.getErrorLog().getNumFailsWithSeverity(2) > 0 ||
                    document.getErrorLog().getNumFailsWithSeverity(3) > 0)
                {
                    var stream = new OStringStream();
                    document.printErrors(stream);
                    Console.WriteLine("Errors encoutered when round-tripping  SBML file: \n" +
                                      stream.str());
                    retval = -1;
                }
                libsbml.writeSBMLToFile(document, "spec_example3_rt.xml");
            }
            return(retval);
        }
        private static int Main(string[] args)
        {
            var retval = 0;
            var sbmlns = new SBMLNamespaces(3, 1, "comp", 1);

            // create the document
            var document = new SBMLDocument(sbmlns);

            //Create our submodel
            var compdoc = (CompSBMLDocumentPlugin)(document.getPlugin("comp"));

            compdoc.setRequired(true);
            var mod1 = compdoc.createModelDefinition();

            mod1.setId("enzyme");
            mod1.setName("enzyme");
            var comp = mod1.createCompartment();

            comp.setSpatialDimensions(3);
            comp.setConstant(true);
            comp.setId("comp");
            comp.setSize(1L);
            var spec = new Species(3, 1);

            spec.setCompartment("comp");
            spec.setHasOnlySubstanceUnits(false);
            spec.setConstant(false);
            spec.setBoundaryCondition(false);
            spec.setId("S");
            mod1.addSpecies(spec);
            spec.setId("E");
            mod1.addSpecies(spec);
            spec.setId("D");
            mod1.addSpecies(spec);
            spec.setId("ES");
            mod1.addSpecies(spec);
            var rxn = new Reaction(3, 1);

            rxn.setReversible(true);
            rxn.setFast(false);
            var rxn2 = new Reaction(rxn);

            rxn.setId("J0");
            rxn2.setId("J1");
            var sr = new SpeciesReference(3, 1);

            sr.setConstant(true);
            sr.setStoichiometry(1);
            sr.setSpecies("S");
            rxn.addReactant(sr);
            sr.setSpecies("E");
            rxn.addReactant(sr);
            rxn2.addProduct(sr);
            sr.setSpecies("ES");
            rxn.addProduct(sr);
            rxn2.addReactant(sr);
            sr.setSpecies("D");
            rxn2.addProduct(sr);

            mod1.addReaction(rxn);
            mod1.addReaction(rxn2);

            // create the Model
            var model = document.createModel();

            model.setId("aggregate");

            // Create a submodel
            var mplugin = (CompModelPlugin)(model.getPlugin("comp"));
            var submod1 = mplugin.createSubmodel();

            submod1.setId("submod1");
            submod1.setModelRef("enzyme");

            var submod2 = new Submodel();

            submod2.setId("submod2");
            submod2.setModelRef("enzyme");
            mplugin.addSubmodel(submod2);

            libsbml.writeSBMLToFile(document, "enzyme_model.xml");
            document = libsbml.readSBMLFromFile("enzyme_model.xml");
            if (document == null)
            {
                Console.WriteLine("Error reading back in file.");
                retval = -1;
            }
            else
            {
                document.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, false);
                document.checkConsistency();
                if (document.getErrorLog().getNumFailsWithSeverity(2) > 0 ||
                    document.getErrorLog().getNumFailsWithSeverity(3) > 0)
                {
                    var stream = new OStringStream();
                    document.printErrors(stream);
                    Console.WriteLine("Errors encoutered when round-tripping  SBML file: \n" +
                                      stream.str());
                    retval = -1;
                }
                libsbml.writeSBMLToFile(document, "enzyme_model_rt.xml");
            }
            return(retval);
        }
Ejemplo n.º 9
0
        private static int Main(string[] args)
        {
            var sbmlns = new SBMLNamespaces(3, 1, "comp", 1);

            // create the document
            var document = new SBMLDocument(sbmlns);

            //Define the external model definitions
            var compdoc = (CompSBMLDocumentPlugin)(document.getPlugin("comp"));

            compdoc.setRequired(true);
            var extmod = compdoc.createExternalModelDefinition();

            extmod.setId("ExtMod1");
            extmod.setSource("enzyme_model.xml");
            extmod.setModelRef("enzyme");


            // create the main Model
            var model = document.createModel();

            // Set the submodels
            var mplugin = (CompModelPlugin)(model.getPlugin("comp"));
            var submod1 = mplugin.createSubmodel();

            submod1.setId("A");
            submod1.setModelRef("ExtMod1");
            var submod2 = mplugin.createSubmodel();

            submod2.setId("B");
            submod2.setModelRef("ExtMod1");

            // create a replacement compartment
            var comp = model.createCompartment();

            comp.setSpatialDimensions(3);
            comp.setConstant(true);
            comp.setId("comp");
            comp.setSize(1L);

            //Tell the model that this compartment replaces both of the inside ones.
            var compartplug = (CompSBasePlugin)(comp.getPlugin("comp"));
            var re          = new ReplacedElement();

            re.setIdRef("comp");
            re.setSubmodelRef("A");
            compartplug.addReplacedElement(re);
            re.setSubmodelRef("B");
            compartplug.addReplacedElement(re);

            // create a replacement species
            var spec = model.createSpecies();

            spec.setCompartment("comp");
            spec.setHasOnlySubstanceUnits(false);
            spec.setConstant(false);
            spec.setBoundaryCondition(false);
            spec.setId("S");

            //Tell the model that this species replaces both of the inside ones.
            var spp = (CompSBasePlugin)(spec.getPlugin("comp"));

            re.setIdRef("S");
            re.setSubmodelRef("A");
            spp.addReplacedElement(re);
            re.setSubmodelRef("B");
            spp.addReplacedElement(re);


            libsbml.writeSBMLToFile(document, "spec_example2.xml");
            document = libsbml.readSBMLFromFile("spec_example2.xml");
            if (document == null)
            {
                Console.WriteLine("Error reading back in file.");
                return(-1);
            }
            else
            {
                document.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, false);
                document.checkConsistency();
                if (document.getErrorLog().getNumFailsWithSeverity(2) > 0 ||
                    document.getErrorLog().getNumFailsWithSeverity(3) > 0)
                {
                    var stream = new OStringStream();
                    document.printErrors(stream);
                    Console.WriteLine("Errors encoutered when round-tripping  SBML file: \n" +
                                      stream.str());
                    return(-1);
                }
                libsbml.writeSBMLToFile(document, "spec_example2_rt.xml");
            }

            return(0);
        }
Ejemplo n.º 10
0
        public static void validate(string inputFile)
        {
            if (!File.Exists(inputFile))
            {
                Console.WriteLine("[Error] {0} : No such file.", inputFile);
                ++NumInvalid;
                return;
            }

            SBMLDocument sbmlDoc;
            long         start, stop;
            double       timeRead;

            start    = System.DateTime.UtcNow.ToFileTimeUtc();
            sbmlDoc  = libsbml.readSBML(inputFile);
            stop     = System.DateTime.UtcNow.ToFileTimeUtc();
            timeRead = (double)(stop - start) / 10000;

            long     errors = sbmlDoc.getNumErrors();
            FileInfo fi     = new FileInfo(inputFile);

            bool   seriousErrors   = false;
            long   numReadErrors   = 0;
            long   numReadWarnings = 0;
            string errMsgRead      = "";

            if (errors > 0)
            {
                for (int i = 0; i < errors; i++)
                {
                    long severity = sbmlDoc.getError(i).getSeverity();
                    if (severity == libsbml.LIBSBML_SEV_ERROR || severity == libsbml.LIBSBML_SEV_FATAL)
                    {
                        seriousErrors = true;
                        ++numReadErrors;
                    }
                    else
                    {
                        ++numReadWarnings;
                    }
                }

                OStringStream oss = new OStringStream();
                sbmlDoc.printErrors(oss);
                errMsgRead = oss.str();
            }

            // If serious errors are encountered while reading an SBML document, it
            // does not make sense to go on and do full consistency checking because
            // the model may be nonsense in the first place.


            long   numCCErrors   = 0;
            long   numCCWarnings = 0;
            string errMsgCC      = "";
            bool   skipCC        = false;
            double timeCC        = 0.0;

            if (seriousErrors)
            {
                skipCC      = true;
                errMsgRead += "Further consistency checking and validation aborted.";
                ++NumInvalid;
            }
            else
            {
                long failures;

                sbmlDoc.setConsistencyChecks(libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, enableUnitCCheck);
                start    = System.DateTime.UtcNow.ToFileTimeUtc();
                failures = sbmlDoc.checkConsistency();
                stop     = System.DateTime.UtcNow.ToFileTimeUtc();
                timeCC   = (double)(stop - start) / 10000;

                bool isInvalid = false;
                if (failures > 0)
                {
                    for (int i = 0; i < failures; i++)
                    {
                        long severity = sbmlDoc.getError(i).getSeverity();
                        if (severity == libsbml.LIBSBML_SEV_ERROR || severity == libsbml.LIBSBML_SEV_FATAL)
                        {
                            ++numCCErrors;
                            isInvalid = true;
                        }
                        else
                        {
                            ++numCCWarnings;
                        }
                    }

                    if (isInvalid)
                    {
                        ++NumInvalid;
                    }

                    OStringStream oss = new OStringStream();
                    sbmlDoc.printErrors(oss);
                    errMsgCC = oss.str();
                }
            }

            //
            // print results
            //

            Console.WriteLine("               filename : {0}", inputFile);
            Console.WriteLine("       file size (byte) : {0}", fi.Length);
            Console.WriteLine("         read time (ms) : {0}", timeRead);
            Console.WriteLine("      c-check time (ms) : {0}", (skipCC ? "skipped" : timeCC.ToString()));
            Console.WriteLine("    validation error(s) : {0}", numReadErrors + numCCErrors);
            Console.WriteLine("  (consistency error(s)): {0}", (skipCC ? "skipped" : numCCErrors.ToString()));
            Console.WriteLine("  validation warning(s) : {0}", numReadWarnings + numCCWarnings);
            Console.WriteLine("(consistency warning(s)): {0}", (skipCC ? "skipped" : numCCWarnings.ToString()));
            if (errMsgRead != "" || errMsgCC != "")
            {
                Console.WriteLine("\n===== validation error/warning messages =====\n");
                if (errMsgRead != "")
                {
                    Console.WriteLine(errMsgRead);
                }
                if (errMsgCC != "")
                {
                    Console.WriteLine("*** consistency check ***\n");
                    Console.WriteLine(errMsgCC);
                }
            }
        }