sbrt.shell.text.fba
Class RxnFormatV1

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

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

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

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

Constructor Summary
RxnFormatV1()
          Constructs a new irreversible 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(IrrevRxn rxn)
          Returns a formatted string representation of the provided irreversible reaction.
 java.lang.String format(RevExchRxn rxn)
          Returns a formatted string representation of the provided reversible exchange reaction.
 java.lang.String format(RevRxn rxn)
          Returns a formatted string representation of the provided reversible reaction.
 java.lang.String format(SinkRxn rxn)
          Returns a formatted string representation of the provided sink reaction.
 java.lang.String format(SourceRxn rxn)
          Returns a formatted string representation of the provided source reaction.
 ChemSpeciesFormatV1 getChemSpeciesFormat()
          Returns the format used for chemical species.
 IrrevRxnFormatV1 getIrrevRxnFormat()
          Returns the format used for irreversible reactions.
 RevRxnFormatV1 getRevRxnFormat()
          Returns the format used for reversible reactions.
 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
 

Constructor Detail

RxnFormatV1

public RxnFormatV1()
Constructs a new irreversible reaction format.

Method Detail

getChemSpeciesFormat

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

Returns:
the format used for chemical species.

getIrrevRxnFormat

public IrrevRxnFormatV1 getIrrevRxnFormat()
Returns the format used for irreversible reactions.

Returns:
the format used for irreversible reactions.

getRevRxnFormat

public RevRxnFormatV1 getRevRxnFormat()
Returns the format used for reversible reactions.

Returns:
the format used for reversible reactions.

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, RevRxn, SourceRxn, SinkRxn, or RevExchRxn.

format

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

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

format

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

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

format

public java.lang.String format(SinkRxn rxn)
Returns a formatted string representation of the provided sink reaction.

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

format

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

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

format

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

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

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.