sbrt.shell.text.fba
Class RevRxnFormatV1

java.lang.Object
  extended by sbrt.shell.text.fba.RevRxnFormatV1
All Implemented Interfaces:
Format, Formatter<ChemRxn>, Parser<ChemRxn>, SimpleFormat<ChemRxn>

public final class RevRxnFormatV1
extends java.lang.Object
implements SimpleFormat<ChemRxn>

This class is used to format reversible reactions for use in flux balance analysis.

Author:
This class was written and documented by Jeremiah Wright while in the Wagner lab.

Field Summary
static java.lang.String ARROW
          The arrow used to signify an irreversible reaction.
static java.lang.String SURR
          The string used to denote the surroundings.
 
Constructor Summary
RevRxnFormatV1()
          Constructs a new reversible reaction format.
 
Method Summary
 java.lang.String format(ChemRxn rxn)
          Returns a formatted string representation of the provided irreversible chemical reaction.
 java.lang.String format(RevExchRxn rxn)
          Returns a formatted string representation of the provided source.
 java.lang.String format(RevRxn rxn)
          Returns a formatted string representation of the provided irreversible chemical reaction.
 ChemSpeciesFormatV1 getChemSpeciesFormat()
          Returns the format used for chemical species.
 LinearCombFormatV1<java.lang.String> getLinearCombFormat()
          Returns the format used for stoichiometric expressions.
 ChemRxn parse(java.lang.String reaction)
          Parses the provided string and returns its corresponding chemical reaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SURR

public static final java.lang.String SURR
The string used to denote the surroundings. This is used as a pseudo-species when representing exchange reactions.

See Also:
Constant Field Values

ARROW

public static final java.lang.String ARROW
The arrow used to signify an irreversible reaction.

See Also:
Constant Field Values
Constructor Detail

RevRxnFormatV1

public RevRxnFormatV1()
Constructs a new reversible reaction format.

Method Detail

getChemSpeciesFormat

public ChemSpeciesFormatV1 getChemSpeciesFormat()
Returns the format used for chemical species.

Returns:
the format used for chemical species.

getLinearCombFormat

public LinearCombFormatV1<java.lang.String> getLinearCombFormat()
Returns the format used for stoichiometric expressions.

Returns:
the format used for stoichiometric expressions.

format

public java.lang.String format(ChemRxn rxn)
Returns a formatted string representation of the provided irreversible chemical reaction.

Specified by:
format in interface Formatter<ChemRxn>
Parameters:
rxn - the reaction to be formatted.
Returns:
a formatted string representation of the provided irreversible chemical reaction.
Throws:
java.lang.IllegalArgumentException - if rxn is not an IrrevRxn, SourceRxn, or SinkRxn.

format

public java.lang.String format(RevRxn rxn)
Returns a formatted string representation of the provided irreversible chemical reaction.

Parameters:
rxn - the reaction to be formatted.
Returns:
a formatted string representation of the provided irreversible chemical reaction.

format

public java.lang.String format(RevExchRxn rxn)
Returns a formatted string representation of the provided source.

Parameters:
rxn - the reaction to be formatted.
Returns:
a formatted string representation of the provided source.

parse

public ChemRxn parse(java.lang.String reaction)
Parses the provided string and returns its corresponding chemical reaction.

Specified by:
parse in interface Parser<ChemRxn>
Parameters:
reaction - the string to be parsed.
Returns:
the chemical reaction corresponding to the provided string. The type of this reaction will be either IrrevRxn, SourceRxn, or SinkRxn.