SigPath

org.sigpath.datamodel
Class ChemicalImpl

java.lang.Object
  extended by org.sigpath.datamodel.lset.CollectableImpl
      extended by org.sigpath.datamodel.SigPathEntityImpl
          extended by org.sigpath.datamodel.ChemicalImpl
All Implemented Interfaces:
InstanceCallbacks, Chemical, Collectable, SigPathEntity
Direct Known Subclasses:
BioPolymerImpl, ComplexImpl, NamedChemical, SmallMoleculeImpl

public class ChemicalImpl
extends SigPathEntityImpl
implements Chemical

Represents a chemical compound, either protein, DNA, complex, or small molecule. Subclasses are provided which classify Chemicals into more specific categories.

Version:
$Revision: 9227 $
Author:
Fabien Campagne

Field Summary
 
Fields inherited from class org.sigpath.datamodel.SigPathEntityImpl
forwardReferences
 
Constructor Summary
  ChemicalImpl()
           
protected ChemicalImpl(SigPathFactory factory)
           
protected ChemicalImpl(SigPathFactory factory, String spid)
           
 
Method Summary
 void addBecomesInfo(BecomesInfo info)
          Add information about one chemical that this chemical can become.
 void addComesFromInfo(ComesFromInfo info)
          Add information about one chemical that this chemical can come from.
 boolean contains(Chemical part)
          Does the chemical contain this part.
 Collection getBecomes()
          Gets information about the chemicals that this chemical becomes.
 Collection getComesFrom()
          Gets information about the chemical that this chemical comes from
 Set getForwardReferences()
          Chemicals do not reference other entities and always return an empty set.
 Organism getOrganism()
          Returns the organism which produces this chemical.
 Set involvedIn()
          Returns a Set of Reactions/EnzymaticReactions with which this Chemical is involved with
 boolean isBackgroundInformation()
          Is this chemical background information.
 void jdoPreDelete()
           
 void setInvolvedIn(EnzymaticReaction er, boolean state)
          Adds/Removes an EnzymaticReaction to the Set of reactions/enzymaticReactions this Chemical is involvedIn
 void setInvolvedIn(EnzymaticReaction er, boolean state, SigPathFactory factory)
           
 void setInvolvedIn(NamedChemicalInteraction nci, boolean state)
          Makes or destroys the "involved in" association to a Named Chemical Interaction.
 void setInvolvedIn(Reaction reaction, boolean state)
          Adds/Removes a Reaction to the Set of reactions/enzymaticReactions this Chemical is involvedIn
 void setInvolvedIn(Reaction reaction, boolean state, SigPathFactory factory)
           
 void setOrganism(Organism o)
          Sets the organism which produces this chemical.
 
Methods inherited from class org.sigpath.datamodel.SigPathEntityImpl
addAlias, addAliases, addAliases, addReview, addUserComment, changeAlias, getAliases, getAliasesCollection, getAliasesIterator, getChangeLog, getCombinedStringLength, getComments, getDescription, getExternalReferences, getLiteratureReferences, getName, getReviews, getSpid, getUserComments, isExportable, isIndexed, jdoPostLoad, jdoPreClear, jdoPreStore, removeAlias, removeAliases, removeReviews, setAliases, setAliasesCollection, setChangeLog, setComments, setDescription, setExportable, setForwardReferences, setIndexed, setName, setSpid
 
Methods inherited from class org.sigpath.datamodel.lset.CollectableImpl
createCollectionsSet, getCollections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sigpath.datamodel.SigPathEntity
addAlias, addAliases, addReview, addUserComment, changeAlias, getAliases, getAliasesCollection, getAliasesIterator, getChangeLog, getCombinedStringLength, getComments, getDescription, getExternalReferences, getLiteratureReferences, getName, getReviews, getSpid, getUserComments, isExportable, removeAlias, removeAliases, removeReviews, setAliases, setAliasesCollection, setChangeLog, setComments, setDescription, setExportable, setName, setSpid
 
Methods inherited from interface org.sigpath.datamodel.lset.Collectable
getCollections
 

Constructor Detail

ChemicalImpl

public ChemicalImpl()

ChemicalImpl

protected ChemicalImpl(SigPathFactory factory)

ChemicalImpl

protected ChemicalImpl(SigPathFactory factory,
                       String spid)
Method Detail

getBecomes

public Collection getBecomes()
Gets information about the chemicals that this chemical becomes.

Specified by:
getBecomes in interface Chemical
Returns:
Collection of BecomesInfo instances.
See Also:
BecomesInfo

getComesFrom

public Collection getComesFrom()
Gets information about the chemical that this chemical comes from

Specified by:
getComesFrom in interface Chemical
Returns:
Collection of ComesFromInfo instances.
See Also:
ComesFromInfo

getOrganism

public Organism getOrganism()
Returns the organism which produces this chemical.

Specified by:
getOrganism in interface Chemical

contains

public boolean contains(Chemical part)
Does the chemical contain this part. A complex contains each monomer and their parts, and other molecules contains themselves.

Specified by:
contains in interface Chemical
Returns:
True if the entity contains this part. False otherwise.

setOrganism

public void setOrganism(Organism o)
Sets the organism which produces this chemical.

Specified by:
setOrganism in interface Chemical

involvedIn

public Set involvedIn()
Returns a Set of Reactions/EnzymaticReactions with which this Chemical is involved with

Specified by:
involvedIn in interface Chemical
Returns:
Set of Reactions/EnzymaticReactions

setInvolvedIn

public void setInvolvedIn(Reaction reaction,
                          boolean state)
Adds/Removes a Reaction to the Set of reactions/enzymaticReactions this Chemical is involvedIn

Specified by:
setInvolvedIn in interface Chemical
Parameters:
reaction - Reaction with which this Chemical is involved in
state - boolean value of adding or removing reaction from the list of reactions/enzymaticReactions this Chemical is involved in.
See Also:
Chemical.involvedIn()

setInvolvedIn

public void setInvolvedIn(EnzymaticReaction er,
                          boolean state)
Adds/Removes an EnzymaticReaction to the Set of reactions/enzymaticReactions this Chemical is involvedIn

Specified by:
setInvolvedIn in interface Chemical
Parameters:
er - EnzymaticReaction with which this Chemical is involved in
state - boolean value of adding or removing er from the list of reactions/enzymaticReactions this Chemical is involved in.
See Also:
Chemical.involvedIn()

setInvolvedIn

public void setInvolvedIn(NamedChemicalInteraction nci,
                          boolean state)
Description copied from interface: Chemical
Makes or destroys the "involved in" association to a Named Chemical Interaction. Involved in association describes the fact that the chemical a is/is not involved in the interaction nci. a.setInvolvedIn(er, "true") means that the chemical a is involved in nci. In this case, involvedIn() will return a collection that contains nci.

Specified by:
setInvolvedIn in interface Chemical
Parameters:
nci - NamedChemicalInteraction in which this chemical is involved.
state - True when the chemical is involved in the Named Chemical Interaction, False otherwise.
See Also:
Chemical.involvedIn()

isBackgroundInformation

public boolean isBackgroundInformation()
Description copied from interface: Chemical
Is this chemical background information. A chemical is background information if it not the result of the transformation of another chemical described in sigpath. Background information is usually imported from other biological databases than SigPath, and have appropriate links (database, accession codes pairs).

Specified by:
isBackgroundInformation in interface Chemical

addBecomesInfo

public void addBecomesInfo(BecomesInfo info)
Add information about one chemical that this chemical can become. This method is not part of the interface. It is reserved for SigPath's use. BecomesInfo will be regenerated automatically from reaction data. clearBecomes() should be called before new targets are added with addBecomesInfo().


addComesFromInfo

public void addComesFromInfo(ComesFromInfo info)
Add information about one chemical that this chemical can come from. This method is not part of the interface. It is reserved for SigPath's use. ComesFromInfo will be regenerated automatically from reaction data. clearComesFrom() should be called before new targets are added with addComesFrom().


setInvolvedIn

public void setInvolvedIn(Reaction reaction,
                          boolean state,
                          SigPathFactory factory)

setInvolvedIn

public void setInvolvedIn(EnzymaticReaction er,
                          boolean state,
                          SigPathFactory factory)

getForwardReferences

public Set getForwardReferences()
Chemicals do not reference other entities and always return an empty set.

Specified by:
getForwardReferences in interface SigPathEntity
Returns:
Empty set.

jdoPreDelete

public void jdoPreDelete()
Specified by:
jdoPreDelete in interface InstanceCallbacks
Overrides:
jdoPreDelete in class SigPathEntityImpl

SigPath

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