uk.ac.ebi.intact.model
Class InteractionImpl
java.lang.Object
|
+--uk.ac.ebi.intact.model.IntactObjectImpl
|
+--uk.ac.ebi.intact.model.BasicObjectImpl
|
+--uk.ac.ebi.intact.model.AnnotatedObjectImpl
|
+--uk.ac.ebi.intact.model.InteractorImpl
|
+--uk.ac.ebi.intact.model.InteractionImpl
- All Implemented Interfaces:
- AnnotatedObject, BasicObject, Editable, IntactObject, Interaction, Interactor, java.io.Serializable
- public class InteractionImpl
- extends InteractorImpl
- implements Editable, Interaction
Represents an interaction.
Interaction is derived from Interactor, therefore a given interaction
can participate in new interactions. This allows to build up hierachical
assemblies.
An Interaction may also have other Interactions as products.
This allows to model decomposition of complexes into subcomplexes.
- Version:
- $Id: InteractionImpl.java,v 1.1 2004/01/31 11:31:41 skerrien Exp $
- Author:
- hhe
- See Also:
- Serialized Form
| Methods inherited from class uk.ac.ebi.intact.model.InteractorImpl |
addActiveInstance, addProduct, getActiveInstances, getBioSource, getBioSourceAc, getProducts, removeActiveInstance, removeProduct, setActiveInstances, setBioSource, setBioSourceAc, setProducts |
| Methods inherited from class uk.ac.ebi.intact.model.AnnotatedObjectImpl |
addAlias, addAnnotation, addReference, addXref, getAliases, getAnnotations, getCurator, getCuratorAc, getFullName, getReferences, getShortLabel, getXrefs, removeAlias, removeAnnotation, removeReference, removeXref, setAliases, setAnnotation, setCurator, setCuratorAc, setFullName, setReferences, setShortLabel, setXrefs, update, updateUniqueAnnotation |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface uk.ac.ebi.intact.model.Interactor |
addActiveInstance, addProduct, getActiveInstances, getBioSource, getBioSourceAc, getProducts, removeActiveInstance, removeProduct, setActiveInstances, setBioSource, setBioSourceAc, setProducts |
| Methods inherited from interface uk.ac.ebi.intact.model.AnnotatedObject |
addAlias, addAnnotation, addReference, addXref, getAliases, getAnnotations, getCurator, getCuratorAc, getFullName, getReferences, getShortLabel, getXrefs, removeAlias, removeAnnotation, removeReference, removeXref, setAliases, setAnnotation, setCurator, setCuratorAc, setFullName, setReferences, setShortLabel, setXrefs, update, updateUniqueAnnotation |
InteractionImpl
public InteractionImpl(java.util.Collection experiments,
java.util.Collection components,
CvInteractionType type,
java.lang.String shortLabel,
Institution owner)
- Creates a valid Interaction instance. This requires at least the following:
- At least one valid Experiment
- at least two Components
- an Interaction type (eg covalent binding)
- a dissociation constant (ie kD), as a
Float object
- a short label to refer to this instance
A side-effect of this constructor is to
set the created and updated fields of the instance
to the current time. NOTE: the BioSource value is required for this class as
it is not set via Interactor - this will be taken from the (first) Experiment
in the Collection parameter. It is tehrefore assumed that the Experiment will
be a valid one.
- Parameters:
experiments - A Collection of Experiments which observed this Interaction (non-empty)
NB The BioSource for this Interaction will be taken from the first element of this Collection.components - A Collection of Interaction components (eg Proteins). This cannot be null
but may be empty to allow creation of an Interaction for later population with Componentstype - The type of Interaction observed - may be null if initially unkownshortLabel - The short label to refer to this instance (non-null)
- Throws:
java.lang.NullPointerException - thrown if any of the specified paraneters are
null OR the Experiment does not contain a BioSource.
java.lang.IllegalArgumentException - thrown if either of the experiments or components Collections
are empty, or if there are less than two components specified
getKD
public java.lang.Float getKD()
- Specified by:
getKD in interface Interaction
setKD
public void setKD(java.lang.Float kD)
- Specified by:
setKD in interface Interaction
setComponents
public void setComponents(java.util.Collection someComponent)
- Specified by:
setComponents in interface Interaction
getComponents
public java.util.Collection getComponents()
- Specified by:
getComponents in interface Interaction
addComponent
public void addComponent(Component component)
- Specified by:
addComponent in interface Interaction
removeComponent
public void removeComponent(Component component)
- Specified by:
removeComponent in interface Interaction
setReleased
public void setReleased(java.util.Collection someReleased)
- Specified by:
setReleased in interface Interaction
getReleased
public java.util.Collection getReleased()
- Specified by:
getReleased in interface Interaction
addReleased
public void addReleased(Product product)
- Specified by:
addReleased in interface Interaction
removeReleased
public void removeReleased(Product product)
- Specified by:
removeReleased in interface Interaction
setExperiments
public void setExperiments(java.util.Collection someExperiment)
- Specified by:
setExperiments in interface Interaction
getExperiments
public java.util.Collection getExperiments()
- Specified by:
getExperiments in interface Interaction
addExperiment
public void addExperiment(Experiment experiment)
- Specified by:
addExperiment in interface Interaction
removeExperiment
public void removeExperiment(Experiment experiment)
- Specified by:
removeExperiment in interface Interaction
getCvInteractionType
public CvInteractionType getCvInteractionType()
- Specified by:
getCvInteractionType in interface Interaction
setCvInteractionType
public void setCvInteractionType(CvInteractionType cvInteractionType)
- Specified by:
setCvInteractionType in interface Interaction
getCvInteractionTypeAc
public java.lang.String getCvInteractionTypeAc()
- Specified by:
getCvInteractionTypeAc in interface Interaction
setCvInteractionTypeAc
public void setCvInteractionTypeAc(java.lang.String ac)
- Specified by:
setCvInteractionTypeAc in interface Interaction
getBait
public Component getBait()
- Returns the first components marked as bait.
If no such components is found, return null.
- Specified by:
getBait in interface Interaction
- Returns:
- The first components marked as bait, otherwise null.
equals
public boolean equals(java.lang.Object o)
- Equality for Interactions is currently based on equality for
Interactors, CvInteractionType, kD and Components.
- Specified by:
equals in interface Interaction- Overrides:
equals in class InteractorImpl
- Parameters:
o - The object to check
- Returns:
- true if the parameter equals this object, false otherwise
- See Also:
InteractorImpl,
Component,
CvInteractionType
hashCode
public int hashCode()
- Description copied from class:
AnnotatedObjectImpl
- This class overwrites equals. To ensure proper functioning of HashTable,
hashCode must be overwritten, too.
- Specified by:
hashCode in interface Interaction- Overrides:
hashCode in class InteractorImpl
- Returns:
- hash code of the object.
toString
public java.lang.String toString()
- Specified by:
toString in interface Interaction- Overrides:
toString in class InteractorImpl
IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk