SigPath

org.sigpath.adapter
Class EnzymaticAdapterImpl

java.lang.Object
  extended by org.sigpath.adapter.EnzymaticAdapterImpl
All Implemented Interfaces:
EnzymaticAdapter

public class EnzymaticAdapterImpl
extends Object
implements EnzymaticAdapter

Implementing class that provides database functionality regarding EnzymaticReaction objects.

Author:
Benjamin Chiang
See Also:
EnzymaticReaction, EnzymaticAdapter

Constructor Summary
EnzymaticAdapterImpl(SigPathEntity spe, SPDBManager dbm, ValidationErrors ve)
          Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.
EnzymaticAdapterImpl(SPDBManager dbm, ValidationErrors ve)
          Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.
EnzymaticAdapterImpl(String spid, SPDBManager dbm, ValidationErrors ve)
          Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.
EnzymaticAdapterImpl(ValidationErrors ve)
          Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.
 
Method Summary
static Parameter convertVMaxToKp(Parameter pVMax)
          Converts VMax to Kp.
static Parameter convertVMaxToKp(Parameter pVMax, Parameter pVMax_EnzymeConcentration)
          Calculates Kp from both VMax and VMax_enzymeConcentration Unit of returned Kp is reference first order Unit as defined in class Units.
 Date getDateLastModified()
           
 Date getDateSubmitted()
           
 String getDescription()
           
 EnzymaticReaction getEnzymaticReaction()
          get the EnzymaticReaction object associated with this EnzymaticAdapter
 MoleculeDisplay getEnzyme()
          Get the Enzyme Display object
 Parameter getEnzymeConcentration()
           
 String getEnzymeConcentrationUnit()
           
 double getEnzymeConcentrationValue()
           
 Parameter getKBKP()
          Returns KbKp.
 String getKbKpUnit()
           
 double getKbKpValue()
           
 Parameter getKm()
          Returns Km.
 String getKmUnit()
           
 double getKmValue()
           
 Parameter getKp()
          Returns Kp.
 String getKpUnit()
           
 double getKpValue()
          Get the Kp of the reaction.
 ReactionAdapter getReaction()
          Get the ReactionAdapter that this EnzymaticAdapter contains
 String getUser()
           
 Parameter getVMax()
          Get the VMax of the reaction.
 String getVMaxUnit()
           
 double getVMaxValue()
           
 boolean isKbKpDefined()
           
 boolean isKmDefined()
          Is the Km parameter defined for this enzymatic reaction?
 boolean isKpDefined()
           
 boolean isVMaxDefined()
           
 void removeEnzyme()
          Remove the Enzyme for the reaction
 void removeKBKP()
          Remove the ratio of K1 to Kp of the reaction.
 void removeKm()
          Remove the Km of the reaction.
 void removeKp()
          Remove the Kp of the reaction.
 void removeVMax()
          Removes both Vmax and Enzyme concentration, since the two are linked.
 boolean saveReaction()
          Save the EnzymaticReaction this EnzymaticAdapter contains
 void setDbManager(SPDBManager dbm)
          Set the database manager to use for this adapter.
 void setDescription(String description)
           
 void setEnzyme(String spid)
          Set the Enzyme for the reaction.
 void setKBKP(double v, String u)
          Set the K1 to Kp Ratio for the reaction.
 void setKm(double v, String u)
          Set the Km for the reaction.
 void setKp(double v, String u)
          Set the Kp for the reaction.
 void setReaction(ReactionAdapter reaction)
          Set the ReactionAdapter representing the Reaction that this EnzymaticAdapter contains
 void setUser(String user_name)
          Sets User
 void setVMax(double v, String u, double enzymeConcentration, String concentration_unit)
          Set the VMax for the reaction.
 boolean updateReaction()
          Update the EnzymaticReaction this EnzymaticAdapter contains
 ValidationErrors validate()
          Get the ValidationErrors that were produced when this EnzymaticAdapter was setup The EnzymaticAdapter will not save the EnzymaticReaction until no ValidationErrors exist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymaticAdapterImpl

public EnzymaticAdapterImpl(ValidationErrors ve)
                     throws SigPathDatabaseException
Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.

Constructor for EnzymaticAdapterImpl

Parameters:
ve - validation errors object to store validation errors for this particular EnzymaticAdapter
Throws:
SigPathDatabaseException

EnzymaticAdapterImpl

public EnzymaticAdapterImpl(SPDBManager dbm,
                            ValidationErrors ve)
Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.

Constructor for EnzymaticAdapterImpl

Parameters:
ve - validation errors object to store validation errors for this particular EnzymaticAdapter

EnzymaticAdapterImpl

public EnzymaticAdapterImpl(SigPathEntity spe,
                            SPDBManager dbm,
                            ValidationErrors ve)
Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.

Constructor for EnzymaticAdapterImpl that prepopulates the adapter with a given EnzymaticReaction

Parameters:
spe - SigPathEntity EnzymaticReaction with which to prepopulate this EnzymaticAdapter
dbm - SPDBManager to use for prepopulating this adapter
ve - ValidationErrors validation errors object to store validation errors for this particular EnzymaticAdapter

EnzymaticAdapterImpl

public EnzymaticAdapterImpl(String spid,
                            SPDBManager dbm,
                            ValidationErrors ve)
                     throws SigPathDatabaseException
Deprecated. Use the DBTask framework instead. Adapters will be dropped form SigPath in the near future.

Constructor for EnzymaticAdapterImpl that prepopulates the adapter with a given EnzymaticReaction

Parameters:
spid - String spid of EnzymaticReaction with which to prepopulate this EnzymaticAdapter
dbm - SPDBManager to use for prepopulating this adapter
ve - ValidationErrors validation errors object to store validation errors for this particular EnzymaticAdapter
Throws:
SigPathDatabaseException
Method Detail

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface EnzymaticAdapter

getDescription

public String getDescription()
Specified by:
getDescription in interface EnzymaticAdapter

convertVMaxToKp

public static Parameter convertVMaxToKp(Parameter pVMax)
Converts VMax to Kp. When no enzyme concentration is provided, assume the conversion factor is 1, with appropriate units. Assumption: Vmax unit contains "min" when the time is expressed in minutes, or "sec" when the time is expressed in seconds. This assumption is used to determine the unit of Kp in the same time unit as choosen for Vmax. For instance, if Vmax is entered as 10 micromoles/sec, then Kp is transfered as Kp=1 sec-1. If Vmax = 3 moles/min-1, then Kp=3 min-1. The transfer is only correct if the user really wanted to enter Kp in the first place (we detect this when Vmax is provided without the enzyme concentration at which the measurement was performed).

Parameters:
pVMax - VMax parameter
Returns:
the converted parameter, or null if the assumption has failed.

convertVMaxToKp

public static Parameter convertVMaxToKp(Parameter pVMax,
                                        Parameter pVMax_EnzymeConcentration)
Calculates Kp from both VMax and VMax_enzymeConcentration Unit of returned Kp is reference first order Unit as defined in class Units. It should be sec-1 (IS)).

Parameters:
pVMax -
pVMax_EnzymeConcentration -
Returns:
Parameter

setDbManager

public void setDbManager(SPDBManager dbm)
Set the database manager to use for this adapter.

Specified by:
setDbManager in interface EnzymaticAdapter
Parameters:
dbm - Database manager to use for this adapter.

setEnzyme

public void setEnzyme(String spid)
Description copied from interface: EnzymaticAdapter
Set the Enzyme for the reaction.

Specified by:
setEnzyme in interface EnzymaticAdapter
Parameters:
spid - spid of the enzyme to be set in the EnzymaticReaction

removeEnzyme

public void removeEnzyme()
Description copied from interface: EnzymaticAdapter
Remove the Enzyme for the reaction

Specified by:
removeEnzyme in interface EnzymaticAdapter

getEnzyme

public MoleculeDisplay getEnzyme()
Description copied from interface: EnzymaticAdapter
Get the Enzyme Display object

Specified by:
getEnzyme in interface EnzymaticAdapter
Returns:
MoleculeDisplay object representing the enzyme that has been set to this reaction, or null if no enzyme has been set

setKm

public void setKm(double v,
                  String u)
Description copied from interface: EnzymaticAdapter
Set the Km for the reaction.

Specified by:
setKm in interface EnzymaticAdapter
Parameters:
v - value of the Km Parameter
u - units of the Km Parameter

getKm

public Parameter getKm()
Returns Km.

Specified by:
getKm in interface EnzymaticAdapter
Returns:
a TransientParameter for Km, that can be used outside of a transaction.

getKmValue

public double getKmValue()
Specified by:
getKmValue in interface EnzymaticAdapter

getKmUnit

public String getKmUnit()
Specified by:
getKmUnit in interface EnzymaticAdapter

isKmDefined

public boolean isKmDefined()
Is the Km parameter defined for this enzymatic reaction?

Specified by:
isKmDefined in interface EnzymaticAdapter
Returns:
True if Km is defined, False otherwise.

removeKm

public void removeKm()
Description copied from interface: EnzymaticAdapter
Remove the Km of the reaction.

Specified by:
removeKm in interface EnzymaticAdapter

setVMax

public void setVMax(double v,
                    String u,
                    double enzymeConcentration,
                    String concentration_unit)
Description copied from interface: EnzymaticAdapter
Set the VMax for the reaction.

Specified by:
setVMax in interface EnzymaticAdapter
Parameters:
v - value of the VMax Parameter
u - units of the VMax Parameter

getVMax

public Parameter getVMax()
Description copied from interface: EnzymaticAdapter
Get the VMax of the reaction.

Specified by:
getVMax in interface EnzymaticAdapter
Returns:
Parameter object representing the VMax value that has been set

getVMaxValue

public double getVMaxValue()
Specified by:
getVMaxValue in interface EnzymaticAdapter

getVMaxUnit

public String getVMaxUnit()
Specified by:
getVMaxUnit in interface EnzymaticAdapter

isVMaxDefined

public boolean isVMaxDefined()
Specified by:
isVMaxDefined in interface EnzymaticAdapter

getEnzymeConcentration

public Parameter getEnzymeConcentration()
Specified by:
getEnzymeConcentration in interface EnzymaticAdapter

getEnzymeConcentrationValue

public double getEnzymeConcentrationValue()
Specified by:
getEnzymeConcentrationValue in interface EnzymaticAdapter

getEnzymeConcentrationUnit

public String getEnzymeConcentrationUnit()
Specified by:
getEnzymeConcentrationUnit in interface EnzymaticAdapter

removeVMax

public void removeVMax()
Removes both Vmax and Enzyme concentration, since the two are linked.

Specified by:
removeVMax in interface EnzymaticAdapter

setKp

public void setKp(double v,
                  String u)
Description copied from interface: EnzymaticAdapter
Set the Kp for the reaction.

Specified by:
setKp in interface EnzymaticAdapter
Parameters:
v - value of the Kp Parameter
u - units of the Kp Parameter

getKp

public Parameter getKp()
Returns Kp.

Specified by:
getKp in interface EnzymaticAdapter
Returns:
a TransientParameter for Kp, that can be used outside of a transaction.

isKpDefined

public boolean isKpDefined()
Specified by:
isKpDefined in interface EnzymaticAdapter

removeKp

public void removeKp()
Description copied from interface: EnzymaticAdapter
Remove the Kp of the reaction.

Specified by:
removeKp in interface EnzymaticAdapter

setKBKP

public void setKBKP(double v,
                    String u)
Description copied from interface: EnzymaticAdapter
Set the K1 to Kp Ratio for the reaction.

Specified by:
setKBKP in interface EnzymaticAdapter
Parameters:
v - value of the K1/Kp Parameter
u - units of the K1/Kp Parameter

getKBKP

public Parameter getKBKP()
Returns KbKp.

Specified by:
getKBKP in interface EnzymaticAdapter
Returns:
a TransientParameter for KbKp, that can be used outside of a transaction.

removeKBKP

public void removeKBKP()
Description copied from interface: EnzymaticAdapter
Remove the ratio of K1 to Kp of the reaction.

Specified by:
removeKBKP in interface EnzymaticAdapter

setReaction

public void setReaction(ReactionAdapter reaction)
Description copied from interface: EnzymaticAdapter
Set the ReactionAdapter representing the Reaction that this EnzymaticAdapter contains

Specified by:
setReaction in interface EnzymaticAdapter
Parameters:
reaction - ReactionAdapter representing the Reaction that this EnzymaticAdapter contains

getReaction

public ReactionAdapter getReaction()
Description copied from interface: EnzymaticAdapter
Get the ReactionAdapter that this EnzymaticAdapter contains

Specified by:
getReaction in interface EnzymaticAdapter
Returns:
ReactionAdapter

updateReaction

public boolean updateReaction()
                       throws SigPathDatabaseException
Description copied from interface: EnzymaticAdapter
Update the EnzymaticReaction this EnzymaticAdapter contains

Specified by:
updateReaction in interface EnzymaticAdapter
Returns:
boolean true if reaction successfully updated, otherwise false
Throws:
SigPathDatabaseException

saveReaction

public boolean saveReaction()
                     throws SigPathDatabaseException
Description copied from interface: EnzymaticAdapter
Save the EnzymaticReaction this EnzymaticAdapter contains

Specified by:
saveReaction in interface EnzymaticAdapter
Returns:
boolean true if reaction successfully saved, otherwise false
Throws:
SigPathDatabaseException

validate

public ValidationErrors validate()
Description copied from interface: EnzymaticAdapter
Get the ValidationErrors that were produced when this EnzymaticAdapter was setup The EnzymaticAdapter will not save the EnzymaticReaction until no ValidationErrors exist

Specified by:
validate in interface EnzymaticAdapter
Returns:
ValidationErrors errors that were encountered when setting up this EnzymaticAdapter

getEnzymaticReaction

public EnzymaticReaction getEnzymaticReaction()
Description copied from interface: EnzymaticAdapter
get the EnzymaticReaction object associated with this EnzymaticAdapter

Specified by:
getEnzymaticReaction in interface EnzymaticAdapter
Returns:
EnzymaticReaction associated with this EnzymaticAdapter

setUser

public void setUser(String user_name)
Description copied from interface: EnzymaticAdapter
Sets User

Specified by:
setUser in interface EnzymaticAdapter

getUser

public String getUser()
Specified by:
getUser in interface EnzymaticAdapter

getDateSubmitted

public Date getDateSubmitted()
Specified by:
getDateSubmitted in interface EnzymaticAdapter

getDateLastModified

public Date getDateLastModified()
Specified by:
getDateLastModified in interface EnzymaticAdapter

getKpValue

public double getKpValue()
Description copied from interface: EnzymaticAdapter
Get the Kp of the reaction.

Specified by:
getKpValue in interface EnzymaticAdapter
Returns:
Parameter object representing the Kp value that has been set

getKpUnit

public String getKpUnit()
Specified by:
getKpUnit in interface EnzymaticAdapter

getKbKpValue

public double getKbKpValue()
Specified by:
getKbKpValue in interface EnzymaticAdapter

getKbKpUnit

public String getKbKpUnit()
Specified by:
getKbKpUnit in interface EnzymaticAdapter

isKbKpDefined

public boolean isKbKpDefined()
Specified by:
isKbKpDefined in interface EnzymaticAdapter

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.