uk.ac.ebi.intact.model
Class ProteinImpl
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.ProteinImpl
- All Implemented Interfaces:
- AnnotatedObject, BasicObject, IntactObject, Interactor, Protein, java.io.Serializable
- public class ProteinImpl
- extends InteractorImpl
- implements Protein
Represents a protein or peptide. The object should only contain
the minimum information relevant for IntAct, most information
should only be retrieved by the xref.
- Version:
- $Id: ProteinImpl.java,v 1.1 2004/01/31 11:32:09 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, 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 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, toString |
| 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 |
ProteinImpl
public ProteinImpl(Institution owner,
BioSource source,
java.lang.String shortLabel)
- Creates a valid Protein instance. A valid Protein must have at least an onwer, a
short label to refer to it and a biological source specified. A side-effect of this constructor is to
set the
created and updated fields of the instance
to the current time.
- Parameters:
owner - The 'owner' of the Protein (what does this mean in real terms??)source - The biological source of the Protein observationshortLabel - A memorable label used to refer to the Protein instance
- Throws:
java.lang.NullPointerException - thrown if any parameters are null.
getSequence
public java.lang.String getSequence()
- Specified by:
getSequence in interface Protein
setSequence
public void setSequence(IntactHelper helper,
java.lang.String aSequence,
java.lang.String crc64)
throws IntactException
- Specified by:
setSequence in interface Protein
- Parameters:
helper - aSequence - crc64 -
- Throws:
IntactException
setSequence
public void setSequence(IntactHelper helper,
java.lang.String aSequence)
throws IntactException
- If there is existing sequence (and chunks), reuse existing chunk
in order to save AC.
The update is canceled if the sequence is null or the same.
- Specified by:
setSequence in interface Protein
- Parameters:
helper - aSequence - the sequence to update in the protein
- Throws:
IntactException
getCrc64
public java.lang.String getCrc64()
- Specified by:
getCrc64 in interface Protein
setCrc64
public void setCrc64(java.lang.String crc64)
- Specified by:
setCrc64 in interface Protein
getFormOf
public Protein getFormOf()
- Specified by:
getFormOf in interface Protein
setFormOf
public void setFormOf(Protein protein)
- Specified by:
setFormOf in interface Protein
getCvProteinForm
public CvProteinForm getCvProteinForm()
- Specified by:
getCvProteinForm in interface Protein
setCvProteinForm
public void setCvProteinForm(CvProteinForm cvProteinForm)
- Specified by:
setCvProteinForm in interface Protein
setFeatures
public void setFeatures(java.util.Collection someFeature)
- Specified by:
setFeatures in interface Protein
getFeatures
public java.util.Collection getFeatures()
- Specified by:
getFeatures in interface Protein
addFeature
public void addFeature(Feature feature)
- Specified by:
addFeature in interface Protein
removeFeature
public void removeFeature(Feature feature)
- Specified by:
removeFeature in interface Protein
setModifications
public void setModifications(java.util.Collection someModification)
- Specified by:
setModifications in interface Protein
getModifications
public java.util.Collection getModifications()
- Specified by:
getModifications in interface Protein
addModification
public void addModification(Modification modification)
- Specified by:
addModification in interface Protein
removeModification
public void removeModification(Modification modification)
- Specified by:
removeModification in interface Protein
getCvProteinFormAc
public java.lang.String getCvProteinFormAc()
- Specified by:
getCvProteinFormAc in interface Protein
setCvProteinFormAc
public void setCvProteinFormAc(java.lang.String cvProteinFormAc)
- Specified by:
setCvProteinFormAc in interface Protein
getFormOfAc
public java.lang.String getFormOfAc()
- Specified by:
getFormOfAc in interface Protein
setFormOfAc
public void setFormOfAc(java.lang.String ac)
- Specified by:
setFormOfAc in interface Protein
equals
public boolean equals(java.lang.Object o)
- Equality for Proteins is currently based on equality for
Interactors, the sequence and the crc64 checksum.
- Specified by:
equals in interface Protein- Overrides:
equals in class InteractorImpl
- Parameters:
o - The object to check
- Returns:
- true if the parameter equals this object, false otherwise
- See Also:
InteractorImpl
hashCode
public int hashCode()
- Remember that hashCode and equals methods has to be develop in parallel
since : if a.equals(b) then a.hoshCode() == b.hashCode()
The other way round is NOT true.
Unless it could break consistancy when storing object in a hash-based
collection such as HashMap...
- Specified by:
hashCode in interface Protein- Overrides:
hashCode in class InteractorImpl
- Returns:
- hash code of the object.
IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk