SigPath

org.sigpath.datamodel
Class ComplexImpl

java.lang.Object
  extended by org.sigpath.datamodel.lset.CollectableImpl
      extended by org.sigpath.datamodel.SigPathEntityImpl
          extended by org.sigpath.datamodel.ChemicalImpl
              extended by org.sigpath.datamodel.ComplexImpl
All Implemented Interfaces:
InstanceCallbacks, Chemical, Complex, Collectable, MacroMolecule, SigPathEntity

public class ComplexImpl
extends ChemicalImpl
implements Complex

Implements Complex.

Version:
$Revision: 7329 $
Author:
Fabien Campagne

Field Summary
 
Fields inherited from class org.sigpath.datamodel.SigPathEntityImpl
forwardReferences
 
Constructor Summary
  ComplexImpl()
          Default constructor.
protected ComplexImpl(SigPathFactory factory)
           
protected ComplexImpl(SigPathFactory factory, String spid)
           
 
Method Summary
 void addMonomer(Chemical chemical)
          Adds a monomer to this complex.
 void addMonomer(Chemical chemical, int stoechiometry)
          Adds a monomer to this complex.
 boolean contains(Chemical part)
          Does the chemical contain this part.
 Collection getComponents()
          Returns the components of this complex.
 int getStoechiometry(Chemical chem)
          Returns the stoechiometry of the chemical in the complex.
 boolean isFullyDefined()
          Returns the fullyDefined value of this complex.
 void setFullyDefined(boolean fullyDefined)
          Sets the fullyDefined value of this complex.
 
Methods inherited from class org.sigpath.datamodel.ChemicalImpl
addBecomesInfo, addComesFromInfo, getBecomes, getComesFrom, getForwardReferences, getOrganism, involvedIn, isBackgroundInformation, jdoPreDelete, setInvolvedIn, setInvolvedIn, setInvolvedIn, setInvolvedIn, setInvolvedIn, setOrganism
 
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.Chemical
getBecomes, getComesFrom, getOrganism, involvedIn, isBackgroundInformation, setInvolvedIn, setInvolvedIn, setInvolvedIn, setOrganism
 
Methods inherited from interface org.sigpath.datamodel.SigPathEntity
addAlias, addAliases, addReview, addUserComment, changeAlias, getAliases, getAliasesCollection, getAliasesIterator, getChangeLog, getCombinedStringLength, getComments, getDescription, getExternalReferences, getForwardReferences, 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

ComplexImpl

public ComplexImpl()
Default constructor.


ComplexImpl

protected ComplexImpl(SigPathFactory factory)

ComplexImpl

protected ComplexImpl(SigPathFactory factory,
                      String spid)
Method Detail

getComponents

public Collection getComponents()
Returns the components of this complex.

Specified by:
getComponents in interface Complex

addMonomer

public void addMonomer(Chemical chemical)
Adds a monomer to this complex. Use this to add one monomer to a complex when the stoechiometry of the monomer in the complex is 1.

Specified by:
addMonomer in interface Complex
Parameters:
chemical - The chemical to add to this complex

addMonomer

public void addMonomer(Chemical chemical,
                       int stoechiometry)
Adds a monomer to this complex. Use this to add one monomer to a complex when the stoechiometry of the monomer can be more than 1 in the complex.

Specified by:
addMonomer in interface Complex
Parameters:
chemical - Chemical to be added to this complex.
stoechiometry - Stoechiometry of the monomer in the complex. (1+ are valid values for the stoechiometry).

contains

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

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

getStoechiometry

public int getStoechiometry(Chemical chem)
Description copied from interface: Complex
Returns the stoechiometry of the chemical in the complex. This is the number of time the chemical appears at the first level of this complex. in complex A.A.A.B, stoechiometry of A is 3 and stoechiometry of B is 1. In a recursive complexe such as (A.B).A.A.B, only the first level is considered. Therefore, stoechiometry of A is 2, stoechiometry of B is 1, and stoechiometry of A.B is 1.

Specified by:
getStoechiometry in interface Complex

isFullyDefined

public boolean isFullyDefined()
Returns the fullyDefined value of this complex.

Specified by:
isFullyDefined in interface Complex
Returns:
true if the complex is fully defined

setFullyDefined

public void setFullyDefined(boolean fullyDefined)
Sets the fullyDefined value of this complex.

Specified by:
setFullyDefined in interface Complex

SigPath

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