Search in sources :

Example 31 with Product

use of cbit.vcell.model.Product in project vcell by virtualcell.

the class ReactPartTable method getReactionParticipant.

/**
 * This method was created in VisualAge.
 * @return cbit.vcell.model.ReactionParticipant
 * @param rset java.sql.ResultSet
 */
public ReactionParticipant getReactionParticipant(KeyValue rpKey, java.sql.ResultSet rset) throws java.sql.SQLException, DataAccessException {
    ReactionParticipant rp = null;
    KeyValue key = rpKey;
    String role = rset.getString(ReactPartTable.table.role.toString());
    int stoichiometry = rset.getInt(ReactPartTable.table.stoich.toString());
    if (role.equals(ROLE_CATALYST)) {
        rp = new Catalyst(key, null, null);
    } else if (role.equals(ROLE_PRODUCT)) {
        rp = new Product(key, null, null, stoichiometry);
    } else if (role.equals(ROLE_REACTANT)) {
        rp = new Reactant(key, null, null, stoichiometry);
    } else if (role.equals(ROLE_FLUX)) {
        rp = new FluxReaction.Flux(key, null, null);
    } else {
        throw new DataAccessException("unexpected value of " + ReactPartTable.table.role.toString() + "'" + role + "'");
    }
    rp.setStoichiometry(stoichiometry);
    return rp;
}
Also used : KeyValue(org.vcell.util.document.KeyValue) Product(cbit.vcell.model.Product) ReactionParticipant(cbit.vcell.model.ReactionParticipant) Reactant(cbit.vcell.model.Reactant) Catalyst(cbit.vcell.model.Catalyst) DataAccessException(org.vcell.util.DataAccessException)

Aggregations

Product (cbit.vcell.model.Product)31 Reactant (cbit.vcell.model.Reactant)30 ReactionParticipant (cbit.vcell.model.ReactionParticipant)26 ReactionStep (cbit.vcell.model.ReactionStep)22 SpeciesContext (cbit.vcell.model.SpeciesContext)19 SimpleReaction (cbit.vcell.model.SimpleReaction)12 ArrayList (java.util.ArrayList)12 Model (cbit.vcell.model.Model)11 Structure (cbit.vcell.model.Structure)11 Catalyst (cbit.vcell.model.Catalyst)10 FluxReaction (cbit.vcell.model.FluxReaction)10 Expression (cbit.vcell.parser.Expression)10 Kinetics (cbit.vcell.model.Kinetics)8 KineticsParameter (cbit.vcell.model.Kinetics.KineticsParameter)8 ReactionRule (cbit.vcell.model.ReactionRule)8 HashMap (java.util.HashMap)8 LumpedKinetics (cbit.vcell.model.LumpedKinetics)6 ModelParameter (cbit.vcell.model.Model.ModelParameter)5 ExpressionException (cbit.vcell.parser.ExpressionException)5 BioModel (cbit.vcell.biomodel.BioModel)4