libSBML
5.8.0

org.sbml.libsbml
Class ConversionProperties

java.lang.Object
  extended by org.sbml.libsbml.ConversionProperties

public class ConversionProperties
extends Object

Class of object that encapsulates the properties of an SBML 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.

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. These, too, are communicated by the values of the SBML namespaces set on a ConversionProperties object.

See Also:
ConversionOption, SBMLNamespaces

Constructor Summary
ConversionProperties()
          Constructor that initializes the conversion properties with a specific SBML target namespace.
ConversionProperties(ConversionProperties orig)
          Copy constructor.
ConversionProperties(SBMLNamespaces targetNS)
          Constructor that initializes the conversion properties with a specific SBML target namespace.
 
Method Summary
 void addOption(ConversionOption option)
          Adds a copy of the given option to this properties object.
 void addOption(String key)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, boolean value)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, boolean value, String description)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, double value)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, double value, String description)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, float value)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, float value, String description)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, int value)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, int value, String description)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, String value)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, String value, int type)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, String value, int type, String description)
          Adds a new ConversionOption object with the given parameters.
 void addOption(String key, String value, String description)
          Adds a new ConversionOption object with the given parameters.
 ConversionProperties cloneObject()
          Creates and returns a deep copy of this ConversionProperties object.
 void delete()
          Explicitly deletes the underlying native object.
 boolean getBoolValue(String key)
          Returns the value of the given option as a Boolean.
 String getDescription(String key)
          Returns the description string for a given option in this properties object.
 double getDoubleValue(String key)
          Returns the value of the given option as a double.
 float getFloatValue(String key)
          Returns the value of the given option as a float.
 int getIntValue(String key)
          Returns the value of the given option as an integer.
 ConversionOption getOption(String key)
          Returns the ConversionOption object for a given key.
 SBMLNamespaces getTargetNamespaces()
          Returns the current target SBML namespace.
 int getType(String key)
          Returns the type of a given option in this properties object.
 String getValue(String key)
          Returns the value of the given option as a string.
 boolean hasOption(String key)
          Returns true if this properties object contains an option with the given key.
 boolean hasTargetNamespaces()
          Returns true if the target SBML namespace has been set.
 ConversionOption removeOption(String key)
          Removes the option with the given key from this properties object.
 void setBoolValue(String key, boolean value)
          Sets the value of the given option to a Boolean.
 void setDoubleValue(String key, double value)
          Sets the value of the given option to a double.
 void setFloatValue(String key, float value)
          Sets the value of the given option to a float.
 void setIntValue(String key, int value)
          Sets the value of the given option to an integer.
 void setTargetNamespaces(SBMLNamespaces targetNS)
          Sets the target namespace.
 void setValue(String key, String value)
          Sets the value of the given option to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionProperties

public ConversionProperties(SBMLNamespaces targetNS)
Constructor that initializes the conversion properties with a specific SBML target namespace.

Parameters:
targetNS - the target namespace to convert to

ConversionProperties

public ConversionProperties()
Constructor that initializes the conversion properties with a specific SBML target namespace.

Parameters:
targetNS - the target namespace to convert to

ConversionProperties

public ConversionProperties(ConversionProperties orig)
Copy constructor.

Parameters:
orig - the object to copy.

Throws:
SBMLConstructorException - Thrown if the argument orig is null.
Method Detail

delete

public void delete()
Explicitly deletes the underlying native object.

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 ConversionProperties.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 ConversionProperties.delete() themselves.


cloneObject

public ConversionProperties cloneObject()
Creates and returns a deep copy of this ConversionProperties object.

Returns:
a (deep) copy of this ConversionProperties object.

getTargetNamespaces

public SBMLNamespaces getTargetNamespaces()
Returns the current target SBML namespace.

Returns:
the SBMLNamepaces object expressing the target namespace.

hasTargetNamespaces

public boolean hasTargetNamespaces()
Returns true if the target SBML namespace has been set.

Returns:
true if the target namespace has been set, false otherwise.

setTargetNamespaces

public void setTargetNamespaces(SBMLNamespaces targetNS)
Sets the target namespace.

Parameters:
targetNS - the target namespace to use.

getDescription

public String getDescription(String key)
Returns the description string for a given option in this properties object.

Parameters:
key - the key for the option.

Returns:
the description text of the option with the given key.

getType

public int getType(String key)
Returns the type of a given option in this properties object.

Parameters:
key - the key for the option.

Returns:
the type of the option with the given key.

getOption

public ConversionOption getOption(String key)
Returns the ConversionOption object for a given key.

Parameters:
key - the key for the option.

Returns:
the option with the given key.

addOption

public void addOption(ConversionOption option)
Adds a copy of the given option to this properties object.

Parameters:
option - the option to add

addOption

public void addOption(String key,
                      String value,
                      int type,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - (optional) the value of that option
type - (optional) the type of the option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      String value,
                      int type)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - (optional) the value of that option
type - (optional) the type of the option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      String value)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - (optional) the value of that option
type - (optional) the type of the option
description - (optional) the description for the option

addOption

public void addOption(String key)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - (optional) the value of that option
type - (optional) the type of the option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      String value,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the string value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      boolean value,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the boolean value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      boolean value)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the boolean value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      double value,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the double value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      double value)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the double value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      float value,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the float value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      float value)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the float value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      int value,
                      String description)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the integer value of that option
description - (optional) the description for the option

addOption

public void addOption(String key,
                      int value)
Adds a new ConversionOption object with the given parameters.

Parameters:
key - the key for the new option
value - the integer value of that option
description - (optional) the description for the option

removeOption

public ConversionOption removeOption(String key)
Removes the option with the given key from this properties object.

Parameters:
key - the key for the new option to remove
Returns:
the removed option

hasOption

public boolean hasOption(String key)
Returns true if this properties object contains an option with the given key.

Parameters:
key - the key of the option to find.

Returns:
true if an option with the given key exists in this properties object, false otherwise.

getValue

public String getValue(String key)
Returns the value of the given option as a string.

Parameters:
key - the key for the option.

Returns:
the string value of the option with the given key.

setValue

public void setValue(String key,
                     String value)
Sets the value of the given option to a string.

Parameters:
key - the key for the option
value - the new value

getBoolValue

public boolean getBoolValue(String key)
Returns the value of the given option as a Boolean.

Parameters:
key - the key for the option.

Returns:
the boolean value of the option with the given key.

setBoolValue

public void setBoolValue(String key,
                         boolean value)
Sets the value of the given option to a Boolean.

Parameters:
key - the key for the option.

value - the new Boolean value.

getDoubleValue

public double getDoubleValue(String key)
Returns the value of the given option as a double.

Parameters:
key - the key for the option.

Returns:
the double value of the option with the given key.

setDoubleValue

public void setDoubleValue(String key,
                           double value)
Sets the value of the given option to a double.

Parameters:
key - the key for the option.

value - the new double value.

getFloatValue

public float getFloatValue(String key)
Returns the value of the given option as a float.

Parameters:
key - the key for the option.

Returns:
the float value of the option with the given key.

setFloatValue

public void setFloatValue(String key,
                          float value)
Sets the value of the given option to a float.

Parameters:
key - the key for the option.

value - the new float value.

getIntValue

public int getIntValue(String key)
Returns the value of the given option as an integer.

Parameters:
key - the key for the option.

Returns:
the int value of the option with the given key.

setIntValue

public void setIntValue(String key,
                        int value)
Sets the value of the given option to an integer.

Parameters:
key - the key for the option.

value - the new integer value.

libSBML
5.8.0


LibSBML, an application programming interface (API) library for SBML.