libSBML Python API
5.18.0
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
This class provides a central registry of all extensions known to libSBML. Each package extension must be registered with the registry. The registry class is accessed by various classes to retrieve information about known package extensions and to create additional attributes and/or elements by factory objects of the package extensions.
Public Member Functions | |
def | addExtension (self, ext) |
Add the given SBMLExtension object to this SBMLExtensionRegistry. More... | |
def | addL2Namespaces (self, xmlns) |
Adds SBML Level 2 namespaces to the namespace list. More... | |
def | disablePackage (package) |
Disables the package with the given URI or name. More... | |
def | disableUnusedPackages (self, doc) |
Disables unused packages. More... | |
def | enableL2NamespaceForDocument (self, doc) |
Enables package extensions that support serialization to SBML annotations. More... | |
def | enablePackage (package) |
Enables the package with the given URI / name. More... | |
def | getAllRegisteredPackageNames () |
Returns a list of registered packages. More... | |
def | getASTPlugin (self, i) |
def | getASTPlugins (self) |
def | getExtension (self, package) |
Returns an SBMLExtension object with the given package URI or package name. More... | |
def | getInstance () |
Returns a singleton instance of the registry. More... | |
def | getNumASTPlugins (self) |
def | getNumExtension (self, extPoint) |
Returns the number of extensions that have a given extension point. More... | |
def | getNumRegisteredPackages () |
Returns the number of registered packages. More... | |
def | getRegisteredPackageName (index) |
Returns the nth registered package. More... | |
def | isEnabled (self, uri) |
Returns True if the given extension is enabled. More... | |
def | isPackageEnabled (package) |
Returns True if the named package is enabled. More... | |
def | isRegistered (self, uri) |
Returns True if a package extension is registered for the corresponding package URI. More... | |
def | removeL2Namespaces (self, xmlns) |
Removes SBML Level 2 namespaces from the namespace list. More... | |
def | setEnabled (self, uri, isEnabled) |
Enables or disable the package with the given URI. More... | |
def libsbml.SBMLExtensionRegistry.addExtension | ( | self, | |
ext | |||
) |
Add the given SBMLExtension object to this SBMLExtensionRegistry.
addExtension(SBMLExtension ext) int
ext | the SBMLExtension object to be added. |
def libsbml.SBMLExtensionRegistry.addL2Namespaces | ( | self, | |
xmlns | |||
) |
Adds SBML Level 2 namespaces to the namespace list.
addL2Namespaces(XMLNamespaces xmlns)
xmlns | an XMLNamespaces object providing one or more namespaces to be added. |
def libsbml.SBMLExtensionRegistry.disablePackage | ( | package | ) |
Disables the package with the given URI or name.
disablePackage(string package)
package | a string representing the URI or name of the SBML package whose package extension is to be disabled. |
def libsbml.SBMLExtensionRegistry.disableUnusedPackages | ( | self, | |
doc | |||
) |
Disables unused packages.
disableUnusedPackages(SBMLDocument doc)
This method walks through all extensions in the list of plugins of the given SBML document doc
, and disables all that are not being used.
doc | the SBMLDocument object whose unused package extensions should be disabled. |
def libsbml.SBMLExtensionRegistry.enableL2NamespaceForDocument | ( | self, | |
doc | |||
) |
Enables package extensions that support serialization to SBML annotations.
enableL2NamespaceForDocument(SBMLDocument doc)
SBML Level 2 does not have a package mechanism in the way that SBML Level 3 does. However, SBML annotations can be used to store SBML constructs. In fact, a widely-used approach to developing SBML Level 3 packages involves first using them as annotations.
doc | the SBMLDocument object for which this should be enabled. |
def libsbml.SBMLExtensionRegistry.enablePackage | ( | package | ) |
Enables the package with the given URI / name.
enablePackage(string package)
package | the name or URI of a package to enable. |
def libsbml.SBMLExtensionRegistry.getAllRegisteredPackageNames | ( | ) |
Returns a list of registered packages.
getAllRegisteredPackageNames() std::vector< std::string >
This method returns a vector of strings containing the nicknames of the SBML packages for which package extensions are registered with this copy of libSBML. The vector will contain string
objects.
def libsbml.SBMLExtensionRegistry.getASTPlugin | ( | self, | |
i | |||
) |
getASTPlugin(long i) ASTBasePlugin
def libsbml.SBMLExtensionRegistry.getASTPlugins | ( | self | ) |
getASTPlugins() std::vector< ASTBasePlugin * >
def libsbml.SBMLExtensionRegistry.getExtension | ( | self, | |
package | |||
) |
Returns an SBMLExtension object with the given package URI or package name.
getExtension(string package) SBMLExtension
package | a string representing the URI or name of the SBML package whose package extension is being sought. |
def libsbml.SBMLExtensionRegistry.getInstance | ( | ) |
Returns a singleton instance of the registry.
getInstance() SBMLExtensionRegistry
Callers need to obtain a copy of the package extension registry before they can invoke its methods. The registry is implemented as a singleton, and this is the method callers can use to get a copy of it.
def libsbml.SBMLExtensionRegistry.getNumASTPlugins | ( | self | ) |
getNumASTPlugins() long
def libsbml.SBMLExtensionRegistry.getNumExtension | ( | self, | |
extPoint | |||
) |
Returns the number of extensions that have a given extension point.
getNumExtension(SBaseExtensionPoint extPoint) long
extPoint | the SBaseExtensionPoint object. |
def libsbml.SBMLExtensionRegistry.getNumRegisteredPackages | ( | ) |
Returns the number of registered packages.
getNumRegisteredPackages() long
def libsbml.SBMLExtensionRegistry.getRegisteredPackageName | ( | index | ) |
Returns the nth registered package.
getRegisteredPackageName(long index) string
index | zero-based index of the package name to return. |
None
if none such exists.def libsbml.SBMLExtensionRegistry.isEnabled | ( | self, | |
uri | |||
) |
Returns True
if the given extension is enabled.
isEnabled(string uri) bool
uri | the URI of the target package. |
False
if the given package is disabled or not registered, True
otherwise. def libsbml.SBMLExtensionRegistry.isPackageEnabled | ( | package | ) |
Returns True
if the named package is enabled.
isPackageEnabled(string package) bool
package | the name or URI of a package to test. |
True
if the package is enabled, False
otherwise. def libsbml.SBMLExtensionRegistry.isRegistered | ( | self, | |
uri | |||
) |
Returns True
if a package extension is registered for the corresponding package URI.
isRegistered(string uri) bool
uri | the URI of the target package. |
True
if the package with the given URI is registered, otherwise returns False
. def libsbml.SBMLExtensionRegistry.removeL2Namespaces | ( | self, | |
xmlns | |||
) |
Removes SBML Level 2 namespaces from the namespace list.
removeL2Namespaces(XMLNamespaces xmlns)
xmlns | an XMLNamespaces object listing one or more namespaces to be removed. |
def libsbml.SBMLExtensionRegistry.setEnabled | ( | self, | |
uri, | |||
isEnabled | |||
) |
Enables or disable the package with the given URI.
setEnabled(string uri, bool isEnabled) bool
uri | the URI of the target package. |
isEnabled | True to enable the package, False to disable. |
False
if isEnabled
is False
or the given package is not registered, otherwise this method returns True
.