uk.ac.ebi.intact.model
Class Annotation

java.lang.Object
  |
  +--uk.ac.ebi.intact.model.IntactObjectImpl
        |
        +--uk.ac.ebi.intact.model.BasicObjectImpl
              |
              +--uk.ac.ebi.intact.model.Annotation
All Implemented Interfaces:
BasicObject, IntactObject, java.io.Serializable

public class Annotation
extends BasicObjectImpl

Funtional description of an object.

Version:
$Id: Annotation.java,v 1.9 2004/02/20 10:40:12 skerrien Exp $
Author:
hhe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
ac, NEW_LINE
 
Constructor Summary
Annotation(Institution owner, CvTopic topic)
          Creates a valid Annotation instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality for Annotations is currently based on equality for CvTopics and annotationText (a String).
 java.lang.String getAnnotationText()
           
 CvTopic getCvTopic()
           
 java.lang.String getCvTopicAc()
           
 int hashCode()
          This class overwrites equals.
 void setAnnotationText(java.lang.String annotationText)
           
 void setCvTopic(CvTopic cvTopic)
           
 void setCvTopicAc(java.lang.String ac)
           
 java.lang.String toString()
           
 
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.IntactObject
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 

Constructor Detail

Annotation

public Annotation(Institution owner,
                  CvTopic topic)
Creates a valid Annotation instance. A valid instance must have at least a non-null Institution 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 Institution which 'owns' this BioSource
topic - Refers to the controlled vocabulary topic this Annotation relates to. This should be non-null.
Throws:
java.lang.NullPointerException - thrown if no Institution specified.
Method Detail

getAnnotationText

public java.lang.String getAnnotationText()

setAnnotationText

public void setAnnotationText(java.lang.String annotationText)

getCvTopic

public CvTopic getCvTopic()

setCvTopic

public void setCvTopic(CvTopic cvTopic)

getCvTopicAc

public java.lang.String getCvTopicAc()

setCvTopicAc

public void setCvTopicAc(java.lang.String ac)

equals

public boolean equals(java.lang.Object o)
Equality for Annotations is currently based on equality for CvTopics and annotationText (a String).

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to check
Returns:
true if the parameter equals this object, false otherwise
See Also:
CvTopic

hashCode

public int hashCode()
This class overwrites equals. To ensure proper functioning of HashTable, hashCode must be overwritten, too.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code of the object.

toString

public java.lang.String toString()
Specified by:
toString in interface BasicObject
Overrides:
toString in class BasicObjectImpl


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