|
libSBML C# API
libSBML 5.10.0 C# API
|
{core}
Class to store the Level, Version and XML namespace information of an SBML extension package.Public Member Functions | |
| int | addNamespace (string uri, string prefix) |
| Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addNamespaces (XMLNamespaces xmlns) |
| Add the given XML namespaces list to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addPackageNamespace (string pkgName, long pkgVersion, string prefix) |
| Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addPackageNamespace (string pkgName, long pkgVersion) |
| Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addPackageNamespaces (XMLNamespaces xmlns) |
| Add the XML namespaces of package extensions in the given XMLNamespace object to the set of namespaces within this SBMLNamespaces object (Non-package XML namespaces are not added by this function). More... | |
| int | addPkgNamespace (string pkgName, long pkgVersion, string prefix) |
| Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addPkgNamespace (string pkgName, long pkgVersion) |
| Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object. More... | |
| int | addPkgNamespaces (XMLNamespaces xmlns) |
| Add the XML namespaces of package extensions in the given XMLNamespace object to the set of namespaces within this SBMLNamespaces object. More... | |
| SBMLNamespaces | clone () |
| Creates and returns a deep copy of this SBMLNamespaces. More... | |
| override void | Dispose () |
| override bool | Equals (Object sb) |
| override int | GetHashCode () |
| long | getLevel () |
| Get the SBML Level of this SBMLNamespaces object. More... | |
| XMLNamespaces | getNamespaces () |
| Get the XML namespaces list for this SBMLNamespaces object. More... | |
| string | getPackageName () |
| Returns the name of the main package for this namespace. More... | |
| long | getPackageVersion () |
| string | getURI () |
| Returns a string representing the SBML XML namespace of this object. More... | |
| long | getVersion () |
| Get the SBML Version of this SBMLNamespaces object. More... | |
| bool | isValidCombination () |
Predicate returning true if the given set of namespaces represent a valid set. More... | |
| int | removeNamespace (string uri) |
| Removes an XML namespace from the set of namespaces within this SBMLNamespaces object. More... | |
| int | removePackageNamespace (long level, long version, string pkgName, long pkgVersion) |
| Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object. More... | |
| int | removePkgNamespace (long level, long version, string pkgName, long pkgVersion) |
| Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object. More... | |
| RenderPkgNamespaces (long level, long version, long pkgVersion, string prefix) | |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version. More... | |
| RenderPkgNamespaces (long level, long version, long pkgVersion) | |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version. More... | |
| RenderPkgNamespaces (long level, long version) | |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version. More... | |
| RenderPkgNamespaces (long level) | |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version. More... | |
| RenderPkgNamespaces () | |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version. More... | |
| RenderPkgNamespaces (RenderPkgNamespaces orig) | |
| Copy constructor; creates a copy of a SBMLExtensionNamespaces. More... | |
Static Public Member Functions | |
| static void | freeSBMLNamespaces (SWIGTYPE_p_List supportedNS) |
| Frees the list of supported namespaces as generated by getSupportedNamespaces(). More... | |
| static string | getSBMLNamespaceURI (long level, long version) |
Returns a string representing the SBML XML namespace for the given level and version of SBML. More... | |
| static SBMLNamespacesList | getSupportedNamespaces () |
| Returns a list of all supported SBMLNamespaces in this version of libsbml. More... | |
| static bool | isSBMLNamespace (string uri) |
Predicate returning true if the given URL is one of SBML XML namespaces. More... | |
| static bool | operator!= (SBMLNamespaces lhs, SBMLNamespaces rhs) |
| static bool | operator== (SBMLNamespaces lhs, SBMLNamespaces rhs) |
Protected Attributes | |
| bool | swigCMemOwn |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | long | level, |
| long | version, | ||
| long | pkgVersion, | ||
| string | prefix | ||
| ) |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version.
| level | the SBML level |
| version | the SBML version |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace (e.g. 'layout', 'multi') to be added. The package's name will be used if the given string is empty (default). |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | long | level, |
| long | version, | ||
| long | pkgVersion | ||
| ) |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version.
| level | the SBML level |
| version | the SBML version |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace (e.g. 'layout', 'multi') to be added. The package's name will be used if the given string is empty (default). |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | long | level, |
| long | version | ||
| ) |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version.
| level | the SBML level |
| version | the SBML version |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace (e.g. 'layout', 'multi') to be added. The package's name will be used if the given string is empty (default). |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | long | level | ) |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version.
| level | the SBML level |
| version | the SBML version |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace (e.g. 'layout', 'multi') to be added. The package's name will be used if the given string is empty (default). |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | ) |
Creates a new SBMLExtensionNamespaces object corresponding to the given SBML level, version and package version.
| level | the SBML level |
| version | the SBML version |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace (e.g. 'layout', 'multi') to be added. The package's name will be used if the given string is empty (default). |
| libsbmlcs.RenderPkgNamespaces.RenderPkgNamespaces | ( | RenderPkgNamespaces | orig | ) |
Copy constructor; creates a copy of a SBMLExtensionNamespaces.
| orig | the SBMLExtensionNamespaces instance to copy. |
|
inherited |
Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this SBMLNamespaces object.
| uri | the XML namespace to be added. |
| prefix | the prefix of the namespace to be added. |
|
inherited |
Add the given XML namespaces list to the set of namespaces within this SBMLNamespaces object.
The following code gives an example of how one could add the XHTML namespace to the list of namespaces recorded by the top-level <sbml> element of a model. It gives the new namespace a prefix of html.
SBMLDocument sd = null;
try
{
sd = new SBMLDocument(3, 1);
}
catch (SBMLConstructorException e)
{
// Here, have code to handle a truly exceptional situation.
// Candidate causes include invalid combinations of SBML
// Level and Version (impossible if hardwired as given here),
// running out of memory, and unknown system exceptions.
}
XMLNamespaces sn = sd.getNamespaces();
if (sn != null)
{
sn.add('http://www.w3.org/1999/xhtml', 'html');
}
else
{
// Handle another truly exceptional situation.
}
| xmlns | the XML namespaces to be added. |
|
inherited |
Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object.
The SBML Level and SBML Version of this object is used.
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace to be added. The package's name will be used if the given string is empty (default). |
|
inherited |
Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object.
The SBML Level and SBML Version of this object is used.
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace to be added. The package's name will be used if the given string is empty (default). |
|
inherited |
Add the XML namespaces of package extensions in the given XMLNamespace object to the set of namespaces within this SBMLNamespaces object (Non-package XML namespaces are not added by this function).
| xmlns | the XML namespaces to be added. |
|
inherited |
Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object.
The SBML Level and SBML Version of this object is used.
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace to be added. The package's name will be used if the given string is empty (default). |
|
inherited |
Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object.
The SBML Level and SBML Version of this object is used.
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
| prefix | the prefix of the package namespace to be added. The package's name will be used if the given string is empty (default). |
|
inherited |
Add the XML namespaces of package extensions in the given XMLNamespace object to the set of namespaces within this SBMLNamespaces object.
Non-package XML namespaces are not added by this function.
| xmlns | the XML namespaces to be added. |
| SBMLNamespaces libsbmlcs.RenderPkgNamespaces.clone | ( | ) |
Creates and returns a deep copy of this SBMLNamespaces.
|
virtual |
Reimplemented from libsbmlcs.SBMLNamespaces.
|
inherited |
|
staticinherited |
Frees the list of supported namespaces as generated by getSupportedNamespaces().
| supportedNS | the list to be freed. |
*
|
inherited |
|
inherited |
Get the SBML Level of this SBMLNamespaces object.
|
inherited |
Get the XML namespaces list for this SBMLNamespaces object.
*
SBMLNamespaces objects are used in libSBML to communicate SBML Level and Version data between constructors and other methods. The SBMLNamespaces object class holds triples consisting of SBML Level, Version, and the corresponding SBML XML namespace. Most constructors for SBML objects in libSBML take a SBMLNamespaces object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version.
The plural name (SBMLNamespaces) is not a mistake, because in SBML Level 3, objects may have extensions added by Level 3 packages used by a given model and therefore may have multiple namespaces associated with them. In SBML Levels below Level 3, the SBMLNamespaces object only records one SBML Level/Version/namespace combination at a time. Most constructors for SBML objects in libSBML take a SBMLNamespaces object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version.
| string libsbmlcs.RenderPkgNamespaces.getPackageName | ( | ) |
Returns the name of the main package for this namespace.
| long libsbmlcs.RenderPkgNamespaces.getPackageVersion | ( | ) |
|
staticinherited |
Returns a string representing the SBML XML namespace for the given level and version of SBML.
| level | the SBML level |
| version | the SBML version |
*
|
staticinherited |
Returns a list of all supported SBMLNamespaces in this version of libsbml.
*
| string libsbmlcs.RenderPkgNamespaces.getURI | ( | ) |
Returns a string representing the SBML XML namespace of this object.
|
inherited |
Get the SBML Version of this SBMLNamespaces object.
|
staticinherited |
Predicate returning true if the given URL is one of SBML XML namespaces.
| uri | the URI of namespace |
true if the 'uri' is one of SBML namespaces, false otherwise.*
|
inherited |
Predicate returning true if the given set of namespaces represent a valid set.
true if the set of namespaces is valid, false otherwise.
|
staticinherited |
|
staticinherited |
|
inherited |
Removes an XML namespace from the set of namespaces within this SBMLNamespaces object.
| uri | the XML namespace to be added. |
|
inherited |
Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object.
| level | the SBML level |
| version | the SBML version |
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
|
inherited |
Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object.
| level | the SBML level |
| version | the SBML version |
| pkgName | the string of package name (e.g. 'layout', 'multi') |
| pkgVersion | the package version |
|
protectedinherited |