/// <summary> /// Converts a SBML document to the latest version (3.1) that is supported. /// </summary> private void convertSBML(SBMLDocument sbmlDoc) { var latestLevel = SBMLDocument.getDefaultLevel(); var latestVersion = SBMLDocument.getDefaultVersion(); if (sbmlDoc.getLevel() == latestLevel || sbmlDoc.getVersion() == latestVersion) { return; } var success = sbmlDoc.setLevelAndVersion(latestLevel, latestVersion); if (!success) { throw new MoBiException(SBMLConstants.CouldNotConvertToActualLevel(latestLevel, latestVersion, sbmlDoc.getLevel(), sbmlDoc.getVersion())); } }