BioSIMI-Python/modules/Subsystem.py
def convertSubsystemLevelAndVersion(self, newLevel, newVersion):
        '''
        Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
        '''
        document = self.getSubsystemDoc()
        check(document,'retreiving document object for subsystem in convert function')
        config = ConversionProperties()
        if config != None:
            config.addOption('setLevelAndVersion')
        # Now, need to set the target level and version (to which to convert the document)
        # Use the setTargetNamespaces() object of the ConversionsProperties as follows.
        # First, need to create a new SBMLNamespaces object with the desired (target) level and version
        sbmlns = SBMLNamespaces(newLevel,newVersion)
        check(sbmlns, 'creating new sbml namespaces')
        # check(config.setTargetNamespaces(sbmlns),'setting target namespaces')
        config.setTargetNamespaces(sbmlns)
        # Use the SBMLDocument.convert(ConversionsProperties) syntax to convert
        check(document.convert(config),'converting document level and version')
        conv_status = document.checkL3v1Compatibility()
        if conv_status != 0:
            print('SBML Level/Version conversion failed')
            return

        Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
        
Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
def convertSubsystemLevelAndVersion(self, newLevel, newVersion):
        document = self.getSubsystemDoc()
        check(document,'retreiving document object for subsystem in convert function')
        config = ConversionProperties()
        if config != None:
            config.addOption('setLevelAndVersion')
        sbmlns = SBMLNamespaces(newLevel,newVersion)
        check(sbmlns, 'creating new sbml namespaces')
        config.setTargetNamespaces(sbmlns)
        check(document.convert(config),'converting document level and version')
        conv_status = document.checkL3v1Compatibility()
        if conv_status != 0:
            print('SBML Level/Version conversion failed')
            return
def convertSubsystemLevelAndVersion ( self , newLevel , newVersion ) : document = self . getSubsystemDoc ( ) check ( document , 'retreiving document object for subsystem in convert function' ) config = ConversionProperties ( ) if config != None : config . addOption ( 'setLevelAndVersion' ) sbmlns = SBMLNamespaces ( newLevel , newVersion ) check ( sbmlns , 'creating new sbml namespaces' ) config . setTargetNamespaces ( sbmlns ) check ( document . convert ( config ) , 'converting document level and version' ) conv_status = document . checkL3v1Compatibility ( ) if conv_status != 0 : print ( 'SBML Level/Version conversion failed' ) return
Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
'''
        Converts the SBMLDocument of the current Subsytem to the newLevel and newVersion
        ''' # Now, need to set the target level and version (to which to convert the document) # Use the setTargetNamespaces() object of the ConversionsProperties as follows. # First, need to create a new SBMLNamespaces object with the desired (target) level and version # check(config.setTargetNamespaces(sbmlns),'setting target namespaces') # Use the SBMLDocument.convert(ConversionsProperties) syntax to convert
self
newLevel
newVersion