libSBML Python API  5.10.0
 All Classes Namespaces Files Functions Variables Modules Pages
libsbml.SBMLConverterRegistry Class Reference
Inheritance diagram for libsbml.SBMLConverterRegistry:
[legend]

Detailed Description

{core}

Registry of all SBML converters.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.

LibSBML provides facilities for transforming and converting SBML documents in various ways. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. Converters are implemented as objects derived from the class SBMLConverter.

The converter registry, implemented as a singleton object of class SBMLConverterRegistry, maintains a list of known converters and provides methods for discovering them. Callers can use the method SBMLConverterRegistry.getNumConverters() to find out how many converters are registered, then use SBMLConverterRegistry.getConverterByIndex() to iterate over each one; alternatively, callers can use SBMLConverterRegistry.getConverterFor() to search for a converter having specific properties.

Public Member Functions

def addConverter
 
def getConverterByIndex
 
def getConverterFor
 
def getInstance
 
def getNumConverters
 

Member Function Documentation

def libsbml.SBMLConverterRegistry.addConverter (   self,
  args 
)

Python method signature(s):

addConverter(SBMLConverterRegistry self, SBMLConverter converter)   int

Adds the given converter to the registry of SBML converters.

Parameters
converterthe converter to add to the registry.
Returns
integer value indicating the success/failure of the operation. The possible values are:
def libsbml.SBMLConverterRegistry.getConverterByIndex (   self,
  args 
)

Python method signature(s):

getConverterByIndex(SBMLConverterRegistry self, int index)   SBMLConverter

Returns the converter with the given index number.

Converters are given arbitrary index numbers by the registry. Callers can use the method SBMLConverterRegistry.getNumConverters() to find out how many converters are registered, then use this method to iterate over the list and obtain each one in turn.

Parameters
indexthe zero-based index of the converter to fetch.
Returns
the converter with the given index number, or None if the number is less than 0 or there is no converter at the given index position.
def libsbml.SBMLConverterRegistry.getConverterFor (   self,
  args 
)

Python method signature(s):

getConverterFor(SBMLConverterRegistry self, ConversionProperties props)   SBMLConverter

Returns the converter that best matches the given configuration properties.

Many converters provide the ability to configure their behavior. This is realized through the use of properties that offer different options. The present method allows callers to search for converters that have specific property values. Callers can do this by creating a ConversionProperties object, adding the desired option(s) to the object, then passing the object to this method.

Parameters
propsa ConversionProperties object defining the properties to match against.
Returns
the converter matching the properties, or None if no suitable converter is found.
See also
getConverterByIndex()
def libsbml.SBMLConverterRegistry.getInstance ( )

{core}

Registry of all SBML converters.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.

LibSBML provides facilities for transforming and converting SBML documents in various ways. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. Converters are implemented as objects derived from the class SBMLConverter.

The converter registry, implemented as a singleton object of class SBMLConverterRegistry, maintains a list of known converters and provides methods for discovering them. Callers can use the method SBMLConverterRegistry.getNumConverters() to find out how many converters are registered, then use SBMLConverterRegistry.getConverterByIndex() to iterate over each one; alternatively, callers can use SBMLConverterRegistry.getConverterFor() to search for a converter having specific properties. Python method signature(s):

getInstance()   SBMLConverterRegistry

Returns the singleton instance for the converter registry.

Prior to using the registry, callers have to obtain a copy of the registry. This static method provides the means for doing that.

Returns
the singleton for the converter registry.
def libsbml.SBMLConverterRegistry.getNumConverters (   self)

Python method signature(s):

getNumConverters(SBMLConverterRegistry self)   int

Returns the number of converters known by the registry.

Returns
the number of registered converters.
See also
getConverterByIndex()