libSBML C# API  libSBML 5.8.0 C# API
 All Classes Namespaces Files Functions Variables Properties Pages
libsbmlcs.FbcPkgNamespaces Class Reference
Inheritance diagram for libsbmlcs.FbcPkgNamespaces:
[legend]

Detailed Description

Class to store level, version and namespace information of 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 (Non-package XML namespaces are not added by this function). More...
 
SBMLNamespaces clone ()
 Creates and returns a deep copy of this SBMLNamespaces. More...
 
override void Dispose ()
 
override bool Equals (Object sb)
 
 FbcPkgNamespaces (long level, long version, long pkgVersion, string prefix)
 
 FbcPkgNamespaces (long level, long version, long pkgVersion)
 
 FbcPkgNamespaces (long level, long version)
 
 FbcPkgNamespaces (long level)
 
 FbcPkgNamespaces ()
 
 FbcPkgNamespaces (FbcPkgNamespaces orig)
 Copy constructor; creates a copy of a SBMLExtensionNamespaces. More...
 
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...
 

Static Public Member Functions

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
 

Constructor & Destructor Documentation

libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( long  level,
long  version,
long  pkgVersion,
string  prefix 
)
libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( long  level,
long  version,
long  pkgVersion 
)
libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( long  level,
long  version 
)
libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( long  level)
libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( )
libsbmlcs.FbcPkgNamespaces.FbcPkgNamespaces ( FbcPkgNamespaces  orig)

Copy constructor; creates a copy of a SBMLExtensionNamespaces.

Parameters
origthe SBMLExtensionNamespaces instance to copy.

Member Function Documentation

int libsbmlcs.SBMLNamespaces.addNamespace ( string  uri,
string  prefix 
)
inherited

Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this SBMLNamespaces object.

Parameters
urithe XML namespace to be added.
prefixthe prefix of the namespace to be added.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
int libsbmlcs.SBMLNamespaces.addNamespaces ( XMLNamespaces  xmlns)
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. }

Parameters
xmlnsthe XML namespaces to be added.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
int libsbmlcs.SBMLNamespaces.addPackageNamespace ( string  pkgName,
long  pkgVersion,
string  prefix 
)
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.

Note
An XML namespace of a non-registered package extension can't be added by this function (LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned).
Parameters
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
prefixthe prefix of the package namespace to be added. The package's name will be used if the given string is empty (default).
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
See Also
addNamespace()
int libsbmlcs.SBMLNamespaces.addPackageNamespace ( string  pkgName,
long  pkgVersion 
)
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.

Note
An XML namespace of a non-registered package extension can't be added by this function (LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned).
Parameters
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
prefixthe prefix of the package namespace to be added. The package's name will be used if the given string is empty (default).
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
See Also
addNamespace()
int libsbmlcs.SBMLNamespaces.addPackageNamespaces ( XMLNamespaces  xmlns)
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).

Note
XML namespaces of a non-registered package extensions are not added (just ignored) by this function. LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned if the given xmlns is null.
Parameters
xmlnsthe XML namespaces to be added.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
int libsbmlcs.SBMLNamespaces.addPkgNamespace ( string  pkgName,
long  pkgVersion,
string  prefix 
)
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.

Note
An XML namespace of a non-registered package extension can't be added by this function (LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned).
Parameters
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
prefixthe prefix of the package namespace to be added. The package's name will be used if the given string is empty (default).
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
See Also
addNamespace()
int libsbmlcs.SBMLNamespaces.addPkgNamespace ( string  pkgName,
long  pkgVersion 
)
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.

Note
An XML namespace of a non-registered package extension can't be added by this function (LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned).
Parameters
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
prefixthe prefix of the package namespace to be added. The package's name will be used if the given string is empty (default).
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
See Also
addNamespace()
int libsbmlcs.SBMLNamespaces.addPkgNamespaces ( XMLNamespaces  xmlns)
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).

Note
XML namespaces of a non-registered package extensions are not added (just ignored) by this function. LIBSBML_INVALID_ATTRIBUTE_VALUE will be returned if the given xmlns is null.
Parameters
xmlnsthe XML namespaces to be added.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
SBMLNamespaces libsbmlcs.FbcPkgNamespaces.clone ( )

Creates and returns a deep copy of this SBMLNamespaces.

Returns
a (deep) copy of this SBMLNamespaces.
override void libsbmlcs.FbcPkgNamespaces.Dispose ( )
virtual

Reimplemented from libsbmlcs.SBMLNamespaces.

override bool libsbmlcs.SBMLNamespaces.Equals ( Object  sb)
inherited
override int libsbmlcs.SBMLNamespaces.GetHashCode ( )
inherited
long libsbmlcs.SBMLNamespaces.getLevel ( )
inherited

Get the SBML Level of this SBMLNamespaces object.

Returns
the SBML Level of this SBMLNamespaces object.
XMLNamespaces libsbmlcs.SBMLNamespaces.getNamespaces ( )
inherited

Get the XML namespaces list for this SBMLNamespaces object.

The plural 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 there may be multiple XML namespaces involved too. However, until the introduction of SBML Level 3, the SBMLNamespaces object only records one SBML Level/Version/namespace combination at a time, and so this method will also only return a list of one item.

Returns
the XML namespaces of this SBMLNamespaces object.
string libsbmlcs.FbcPkgNamespaces.getPackageName ( )

Returns the name of the main package for this namespace.

Returns
the name of the main package for this namespace. 'core' will be returned if this namespace is defined in the SBML core.
long libsbmlcs.FbcPkgNamespaces.getPackageVersion ( )
static string libsbmlcs.SBMLNamespaces.getSBMLNamespaceURI ( long  level,
long  version 
)
staticinherited

Returns a string representing the SBML XML namespace for the given level and version of SBML.

Parameters
levelthe SBML level
versionthe SBML version
Returns
a string representing the SBML namespace that reflects the SBML Level and Version specified.
Note
Because this is a static method, the non-C++ language interfaces for libSBML will contain two variants. One will be a static method on the class (i.e., SBMLNamespaces), and the other will be a standalone top-level function with the name SBMLNamespaces_getSBMLNamespaceURI(). They are functionally identical.
static SBMLNamespacesList libsbmlcs.SBMLNamespaces.getSupportedNamespaces ( )
staticinherited

Returns a list of all supported SBMLNamespaces in this version of libsbml.

Returns
a list with supported SBML namespaces.
Note
Because this is a static method, the non-C++ language interfaces for libSBML will contain two variants. One will be a static method on the class (i.e., SBMLNamespaces), and the other will be a standalone top-level function with the name SBMLNamespaces_getSupportedNamespaces(). They are functionally identical.
string libsbmlcs.FbcPkgNamespaces.getURI ( )

Returns a string representing the SBML XML namespace of this object.

Returns
a string representing the SBML namespace that reflects the SBML Level and Version of this object.
long libsbmlcs.SBMLNamespaces.getVersion ( )
inherited

Get the SBML Version of this SBMLNamespaces object.

Returns
the SBML Version of this SBMLNamespaces object.
static bool libsbmlcs.SBMLNamespaces.isSBMLNamespace ( string  uri)
staticinherited

Predicate returning true if the given URL is one of SBML XML namespaces.

Parameters
urithe URI of namespace
Returns
true if the 'uri' is one of SBML namespaces, false otherwise.
Note
Because this is a static method, the non-C++ language interfaces for libSBML will contain two variants. One will be a static method on the class (i.e., SBMLNamespaces), and the other will be a standalone top-level function with the name SBMLNamespaces_isSBMLNamespace(). They are functionally identical.
bool libsbmlcs.SBMLNamespaces.isValidCombination ( )
inherited

Predicate returning true if the given set of namespaces represent a valid set.

Returns
true if the set of namespaces is valid, false otherwise.
static bool libsbmlcs.SBMLNamespaces.operator!= ( SBMLNamespaces  lhs,
SBMLNamespaces  rhs 
)
staticinherited
static bool libsbmlcs.SBMLNamespaces.operator== ( SBMLNamespaces  lhs,
SBMLNamespaces  rhs 
)
staticinherited
int libsbmlcs.SBMLNamespaces.removeNamespace ( string  uri)
inherited

Removes an XML namespace from the set of namespaces within this SBMLNamespaces object.

Parameters
urithe XML namespace to be added.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
int libsbmlcs.SBMLNamespaces.removePackageNamespace ( long  level,
long  version,
string  pkgName,
long  pkgVersion 
)
inherited

Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object.

Parameters
levelthe SBML level
versionthe SBML version
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
int libsbmlcs.SBMLNamespaces.removePkgNamespace ( long  level,
long  version,
string  pkgName,
long  pkgVersion 
)
inherited

Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object.

Parameters
levelthe SBML level
versionthe SBML version
pkgNamethe string of package name (e.g. 'layout', 'multi')
pkgVersionthe package version
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:

Member Data Documentation

bool libsbmlcs.SBMLNamespaces.swigCMemOwn
protectedinherited