uk.ac.ebi.intact.model
Class InteractorImpl

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
All Implemented Interfaces:
AnnotatedObject, BasicObject, IntactObject, Interactor, java.io.Serializable
Direct Known Subclasses:
Complex, InteractionImpl, NucleicAcid, ProteinImpl, SmallMolecule

public abstract class InteractorImpl
extends AnnotatedObjectImpl
implements Interactor

Defines a generic interacting object.

Version:
$Id: InteractorImpl.java,v 1.1 2004/01/31 11:31:41 skerrien Exp $
Author:
hhe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ebi.intact.model.AnnotatedObjectImpl
annotations, curator, curatorAc, fullName, references, shortLabel, xrefs
 
Fields inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
ac, NEW_LINE
 
Constructor Summary
protected InteractorImpl()
          no-arg constructor provided for compatibility with subclasses that have no-arg constructors.
protected InteractorImpl(java.lang.String shortLabel, Institution owner)
          Constructor for subclass use only.
 
Method Summary
 void addActiveInstance(Component component)
           
 void addProduct(Product product)
           
 boolean equals(java.lang.Object o)
          Equality for Interactors is currently based on equality for AnnotatedObjects, BioSources and Products.
 java.util.Collection getActiveInstances()
           
 BioSource getBioSource()
           
 java.lang.String getBioSourceAc()
           
 java.util.Collection getProducts()
           
 int hashCode()
          This class overwrites equals.
 void removeActiveInstance(Component component)
           
 void removeProduct(Product product)
           
 void setActiveInstances(java.util.Collection someActiveInstance)
           
 void setBioSource(BioSource bioSource)
           
 void setBioSourceAc(java.lang.String bioSourceAc)
           
 void setProducts(java.util.Collection someProduct)
           
 java.lang.String toString()
           
 
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 uk.ac.ebi.intact.model.BasicObjectImpl
addEvidence, getEvidences, getOwner, getOwnerAc, removeEvidence, setEvidences, setOwner, setOwnerAc
 
Methods inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 
Methods inherited from interface uk.ac.ebi.intact.model.BasicObject
addEvidence, getEvidences, getOwner, getOwnerAc, removeEvidence, setEvidences, setOwner, setOwnerAc
 
Methods inherited from interface uk.ac.ebi.intact.model.IntactObject
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 

Constructor Detail

InteractorImpl

protected InteractorImpl()
no-arg constructor provided for compatibility with subclasses that have no-arg constructors.


InteractorImpl

protected InteractorImpl(java.lang.String shortLabel,
                         Institution owner)
Constructor for subclass use only. Ensures that Interactors cannot be created without at least a shortLabel and an owner specified. NOTE: It is assumed that subclasses of Interactor will supply a valid BioSource; this is initially set to null but other classes may expect it to be non-null.

Parameters:
shortLabel - The memorable label to identify this Interactor
owner - The Institution which owns this Interactor
Throws:
java.lang.NullPointerException - thrown if either parameters are not specified
Method Detail

getBioSource

public BioSource getBioSource()
Specified by:
getBioSource in interface Interactor

setBioSource

public void setBioSource(BioSource bioSource)
Specified by:
setBioSource in interface Interactor

setActiveInstances

public void setActiveInstances(java.util.Collection someActiveInstance)
Specified by:
setActiveInstances in interface Interactor

getActiveInstances

public java.util.Collection getActiveInstances()
Specified by:
getActiveInstances in interface Interactor

addActiveInstance

public void addActiveInstance(Component component)
Specified by:
addActiveInstance in interface Interactor

removeActiveInstance

public void removeActiveInstance(Component component)
Specified by:
removeActiveInstance in interface Interactor

setProducts

public void setProducts(java.util.Collection someProduct)
Specified by:
setProducts in interface Interactor

getProducts

public java.util.Collection getProducts()
Specified by:
getProducts in interface Interactor

addProduct

public void addProduct(Product product)
Specified by:
addProduct in interface Interactor

removeProduct

public void removeProduct(Product product)
Specified by:
removeProduct in interface Interactor

getBioSourceAc

public java.lang.String getBioSourceAc()
Specified by:
getBioSourceAc in interface Interactor

setBioSourceAc

public void setBioSourceAc(java.lang.String bioSourceAc)
Specified by:
setBioSourceAc in interface Interactor

toString

public java.lang.String toString()
Specified by:
toString in interface Interactor
Overrides:
toString in class AnnotatedObjectImpl

equals

public boolean equals(java.lang.Object o)
Equality for Interactors is currently based on equality for AnnotatedObjects, BioSources and Products.

Specified by:
equals in interface Interactor
Overrides:
equals in class AnnotatedObjectImpl
Parameters:
o - The object to check
Returns:
true if the parameter equlas this object, false otherwise
See Also:
AnnotatedObject

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 Interactor
Overrides:
hashCode in class AnnotatedObjectImpl
Returns:
hash code of the object.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk