libSBML C# API  5.18.0
libsbmlcs.ConversionProperties Class Reference
Inheritance diagram for libsbmlcs.ConversionProperties:
[legend]

Detailed Description

Set of configuration option values for a converter.

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 a number of converters that can perform transformations on SBML documents. The properties of SBML converters are communicated using objects of class ConversionProperties, and within such objects, individual options are encapsulated using ConversionOption objects. The ConversionProperties class provides numerous methods for setting and getting options.

ConversionProperties objects are also used to determine the target SBML namespace when an SBML converter's behavior depends on the intended Level+Version combination of SBML. In addition, it is conceivable that conversions may be affected by SBML Level 3 packages being used by an SBML document; consequently, the packages in use are also communicated by the values of the SBML namespaces set on a ConversionProperties object.

General information about the use of SBML converters

The use of all the converters follows a similar approach. First, one creates a ConversionProperties object and calls ConversionProperties::addOption() on this object with one argument: a text string that identifies the desired converter. (The text string is specific to each converter; consult the documentation for a given converter to find out how it should be enabled.)

Next, for some converters, the caller can optionally set some converter-specific properties using additional calls to ConversionProperties::addOption(). Many converters provide the ability to configure their behavior to some extent; this is realized through the use of properties that offer different options. The default property values for each converter can be interrogated using the method SBMLConverter::getDefaultProperties() on the converter class in question .

Finally, the caller should invoke the method SBMLDocument::convert() with the ConversionProperties object as an argument.

Example of invoking an SBML converter

The following code fragment illustrates an example using SBMLReactionConverter, which is invoked using the option string 'replaceReactions':

In the case of SBMLReactionConverter, there are no options to affect its behavior, so the next step is simply to invoke the converter on an SBMLDocument object. Continuing the example code:

Here is an example of using a converter that offers an option. The following code invokes SBMLStripPackageConverter to remove the SBML Level 3 Layout package from a model. It sets the name of the package to be removed by adding a value for the option named 'package' defined by that converter:

Available SBML converters in libSBML

LibSBML provides a number of built-in converters; by convention, their names end in Converter. The following are the built-in converters provided by libSBML 5.18.0:

See also
ConversionOption
SBMLNamespaces

Public Member Functions

new void addOption (ConversionOption option)
 Adds a copy of the given option to this properties object. More...
 
new void addOption (string key, string value, int type, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, string value, int type)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, string value)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, string value, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, bool value, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, bool value)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, double value, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, double value)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, float value, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, float value)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, int value, string description)
 Adds a new ConversionOption object with the given parameters. More...
 
new void addOption (string key, int value)
 Adds a new ConversionOption object with the given parameters. More...
 
new ConversionProperties clone ()
 Creates and returns a deep copy of this ConversionProperties object. More...
 
 ConversionProperties (SBMLNamespaces targetNS)
 Constructor that initializes the conversion properties with a specific SBML target namespace. More...
 
 ConversionProperties ()
 Constructor that initializes the conversion properties with a specific SBML target namespace. More...
 
 ConversionProperties (ConversionProperties orig)
 Copy constructor. More...
 
virtual void Dispose ()
 
new bool getBoolValue (string key)
 Returns the value of the given option as a Boolean. More...
 
new string getDescription (string key)
 Returns the description string for a given option in this properties object. More...
 
new double getDoubleValue (string key)
 Returns the value of the given option as a double. More...
 
new float getFloatValue (string key)
 Returns the value of the given option as a float. More...
 
new int getIntValue (string key)
 Returns the value of the given option as an integer. More...
 
new int getNumOptions ()
 Returns the number of options in this Conversion Properties object. More...
 
new ConversionOption getOption (string key)
 Returns the ConversionOption object for a given key. More...
 
new ConversionOption getOption (int index)
 Returns the ConversionOption object for the given index. More...
 
new SBMLNamespaces getTargetNamespaces ()
 Returns the current target SBML namespace. More...
 
new int getType (string key)
 Returns the type of a given option in this properties object. More...
 
new string getValue (string key)
 Returns the value of the given option as a string. More...
 
new bool hasOption (string key)
 Returns true if this properties object contains an option with the given key. More...
 
new bool hasTargetNamespaces ()
 Returns true if the target SBML namespace has been set. More...
 
new ConversionOption removeOption (string key)
 Removes the option with the given key from this properties object. More...
 
new void setBoolValue (string key, bool value)
 Sets the value of the given option to a Boolean. More...
 
new void setDoubleValue (string key, double value)
 Sets the value of the given option to a double. More...
 
new void setFloatValue (string key, float value)
 Sets the value of the given option to a float. More...
 
new void setIntValue (string key, int value)
 Sets the value of the given option to an integer. More...
 
new void setTargetNamespaces (SBMLNamespaces targetNS)
 Sets the target namespace. More...
 
new void setValue (string key, string value)
 Sets the value of the given option to a string. More...
 

Protected Attributes

bool swigCMemOwn
 

Constructor & Destructor Documentation

libsbmlcs.ConversionProperties.ConversionProperties ( SBMLNamespaces  targetNS)

Constructor that initializes the conversion properties with a specific SBML target namespace.

Parameters
targetNSthe target namespace to convert to.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionProperties.ConversionProperties ( )

Constructor that initializes the conversion properties with a specific SBML target namespace.

Parameters
targetNSthe target namespace to convert to.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionProperties.ConversionProperties ( ConversionProperties  orig)

Copy constructor.

Parameters
origthe object to copy.

Member Function Documentation

new void libsbmlcs.ConversionProperties.addOption ( ConversionOption  option)

Adds a copy of the given option to this properties object.

Parameters
optionthe option to add.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
string  value,
int  type,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
value(optional) the value of that option.
type(optional) the type of the option (see the documentation for ConversionOption for more information about the types).
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
string  value,
int  type 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
value(optional) the value of that option.
type(optional) the type of the option (see the documentation for ConversionOption for more information about the types).
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
string  value 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
value(optional) the value of that option.
type(optional) the type of the option (see the documentation for ConversionOption for more information about the types).
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
value(optional) the value of that option.
type(optional) the type of the option (see the documentation for ConversionOption for more information about the types).
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
string  value,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe string value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
bool  value,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe boolean value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
bool  value 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe boolean value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
double  value,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe double value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
double  value 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe double value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
float  value,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe float value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
float  value 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe float value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
int  value,
string  description 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe integer value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new void libsbmlcs.ConversionProperties.addOption ( string  key,
int  value 
)

Adds a new ConversionOption object with the given parameters.

Parameters
keythe key for the new option.
valuethe integer value of that option.
description(optional) the description for the option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
new ConversionProperties libsbmlcs.ConversionProperties.clone ( )

Creates and returns a deep copy of this ConversionProperties object.

Returns
the (deep) copy of this ConversionProperties object.
virtual void libsbmlcs.ConversionProperties.Dispose ( )
virtual
new bool libsbmlcs.ConversionProperties.getBoolValue ( string  key)

Returns the value of the given option as a Boolean.

Parameters
keythe key for the option.
Returns
the boolean value of the option with the given key.
new string libsbmlcs.ConversionProperties.getDescription ( string  key)

Returns the description string for a given option in this properties object.

Parameters
keythe key for the option.
Returns
the description text of the option with the given key.
new double libsbmlcs.ConversionProperties.getDoubleValue ( string  key)

Returns the value of the given option as a double.

Parameters
keythe key for the option.
Returns
the double value of the option with the given key.
new float libsbmlcs.ConversionProperties.getFloatValue ( string  key)

Returns the value of the given option as a float.

Parameters
keythe key for the option.
Returns
the float value of the option with the given key.
new int libsbmlcs.ConversionProperties.getIntValue ( string  key)

Returns the value of the given option as an integer.

Parameters
keythe key for the option.
Returns
the int value of the option with the given key.
new int libsbmlcs.ConversionProperties.getNumOptions ( )

Returns the number of options in this Conversion Properties object.

Returns
the number of options in this properties object.
new ConversionOption libsbmlcs.ConversionProperties.getOption ( string  key)

Returns the ConversionOption object for a given key.

Parameters
keythe key for the option.
Returns
the option with the given key.
new ConversionOption libsbmlcs.ConversionProperties.getOption ( int  index)

Returns the ConversionOption object for the given index.

Parameters
indexthe index for the option.
Returns
the option with the given index.
new SBMLNamespaces libsbmlcs.ConversionProperties.getTargetNamespaces ( )

Returns the current target SBML namespace.

Returns
the SBMLNamepaces object expressing the target namespace.
new int libsbmlcs.ConversionProperties.getType ( string  key)

Returns the type of a given option in this properties object.

Parameters
keythe key for the option.
Returns
the type of the option with the given key.
new string libsbmlcs.ConversionProperties.getValue ( string  key)

Returns the value of the given option as a string.

Parameters
keythe key for the option.
Returns
the string value of the option with the given key.
new bool libsbmlcs.ConversionProperties.hasOption ( string  key)

Returns true if this properties object contains an option with the given key.

Parameters
keythe key of the option to find.
Returns
true if an option with the given key exists in this properties object, false otherwise.
new bool libsbmlcs.ConversionProperties.hasTargetNamespaces ( )

Returns true if the target SBML namespace has been set.

Returns
true if the target namespace has been set, false otherwise.
new ConversionOption libsbmlcs.ConversionProperties.removeOption ( string  key)

Removes the option with the given key from this properties object.

Parameters
keythe key for the new option to remove.
Returns
the removed option.
new void libsbmlcs.ConversionProperties.setBoolValue ( string  key,
bool  value 
)

Sets the value of the given option to a Boolean.

Parameters
keythe key for the option.
valuethe new Boolean value.
new void libsbmlcs.ConversionProperties.setDoubleValue ( string  key,
double  value 
)

Sets the value of the given option to a double.

Parameters
keythe key for the option.
valuethe new double value.
new void libsbmlcs.ConversionProperties.setFloatValue ( string  key,
float  value 
)

Sets the value of the given option to a float.

Parameters
keythe key for the option.
valuethe new float value.
new void libsbmlcs.ConversionProperties.setIntValue ( string  key,
int  value 
)

Sets the value of the given option to an integer.

Parameters
keythe key for the option.
valuethe new integer value.
new void libsbmlcs.ConversionProperties.setTargetNamespaces ( SBMLNamespaces  targetNS)

Sets the target namespace.

Parameters
targetNSthe target namespace to use.
new void libsbmlcs.ConversionProperties.setValue ( string  key,
string  value 
)

Sets the value of the given option to a string.

Parameters
keythe key for the option.
valuethe new value.

Member Data Documentation

bool libsbmlcs.ConversionProperties.swigCMemOwn
protected