public class SBMLExtensionRegistry extends Object
Modifier and Type | Method and Description |
---|---|
int |
addExtension(org.sbml.libsbml.SBMLExtension ext)
Add the given
SBMLExtension to this SBMLExtensionRegistry . |
void |
addL2Namespaces(XMLNamespaces xmlns)
adds all L2 Extension namespaces to the namespace list.
|
void |
delete()
Explicitly deletes the underlying native object.
|
static void |
disablePackage(String arg0)
Disables the package with the given URI / name.
|
static void |
disablePackages(org.sbml.libsbml.SWIGTYPE_p_std__vectorT_std__string_t packages)
Disables all packages with the given URI / name.
|
void |
disableUnusedPackages(SBMLDocument doc)
Goes through all extensions in the list of plugins of the given document
and disables all plugins that are not being used.
|
void |
enableL2NamespaceForDocument(SBMLDocument doc)
Enables all extensions that support serialization / deserialization with
SBML Annotations.
|
static void |
enablePackage(String arg0)
Enables the package with the given URI / name.
|
static void |
enablePackages(org.sbml.libsbml.SWIGTYPE_p_std__vectorT_std__string_t packages)
Enables all packages with the given URI / name.
|
org.sbml.libsbml.SBMLExtension |
getExtension(String arg0)
Returns an
SBMLExtension object with the given package URI or package name (string). |
static SBMLExtensionRegistry |
getInstance()
Returns an instance (singleton) of the
SBMLExtensionRegistry class. |
long |
getNumExtension(org.sbml.libsbml.SBaseExtensionPoint extPoint)
Returns the number of
SBMLExtension with the given extension point. |
static long |
getNumRegisteredPackages()
Returns the number of registered packages.
|
static String |
getRegisteredPackageName(long index)
Returns the registered package name at the given index
|
boolean |
isEnabled(String uri)
Checks if the extension with the given URI is enabled (true) or
disabled (false)
|
static boolean |
isPackageEnabled(String arg0)   |
boolean |
isRegistered(String uri)
Checks if the extension with the given URI is registered (true)
or not (false)
|
void |
removeL2Namespaces(XMLNamespaces xmlns)
Remove all L2 Extension namespaces from the namespace list.
|
boolean |
setEnabled(String uri,
boolean isEnabled)
Enable/disable the package with the given uri.
|
public int addExtension(org.sbml.libsbml.SBMLExtension ext)
SBMLExtension
to this SBMLExtensionRegistry
.
ext
- the SBMLExtension
object to be added.
public void addL2Namespaces(XMLNamespaces xmlns)
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the SBMLExtensionRegistry.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke SBMLExtensionRegistry.delete()
themselves.
public static void disablePackage(String arg0)
public static void disablePackages(org.sbml.libsbml.SWIGTYPE_p_std__vectorT_std__string_t packages)
public void disableUnusedPackages(SBMLDocument doc)
public void enableL2NamespaceForDocument(SBMLDocument doc)
public static void enablePackage(String arg0)
public static void enablePackages(org.sbml.libsbml.SWIGTYPE_p_std__vectorT_std__string_t packages)
public org.sbml.libsbml.SBMLExtension getExtension(String arg0)
SBMLExtension
object with the given package URI or package name (string).
package
- the URI or name of the package extension
SBMLExtension
object with the given package URI or name. The returned
extension is to be freed (i.e.: deleted) by the caller!public static SBMLExtensionRegistry getInstance()
Returns an instance (singleton) of the SBMLExtensionRegistry
class.
This function needs to be invoked when manipulating the SBMLExtensionRegistry
class.
SBMLExtensionRegistry
object.public long getNumExtension(org.sbml.libsbml.SBaseExtensionPoint extPoint)
SBMLExtension
with the given extension point.
extPoint
- the SBaseExtensionPoint
SBMLExtension
with the given extension point.public static long getNumRegisteredPackages()
public static String getRegisteredPackageName(long index)
index
- zero based index of the package name to return
public boolean isEnabled(String uri)
uri
- the URI of the target package.
public static boolean isPackageEnabled(String arg0)
public boolean isRegistered(String uri)
uri
- the URI of the target package.
public void removeL2Namespaces(XMLNamespaces xmlns)
public boolean setEnabled(String uri, boolean isEnabled)
uri
- the URI of the target package.isEnabled
- the bool value corresponding to enabled (true) or
disabled (false)