uk.ac.ebi.intact.application.editor.struts.view
Class CommentBean

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
        |
        +--uk.ac.ebi.intact.application.editor.struts.view.AbstractEditKeyBean
              |
              +--uk.ac.ebi.intact.application.editor.struts.view.CommentBean
All Implemented Interfaces:
java.io.Serializable

public class CommentBean
extends AbstractEditKeyBean

Bean to store data for comments (annotations).

Version:
$Id: CommentBean.java,v 1.8 2004/03/17 17:29:49 smudali Exp $
Author:
Sugath Mudali (smudali@ebi.ac.uk)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
SAVE, VIEW
 
Constructor Summary
CommentBean()
          Default constructor.
CommentBean(Annotation annotation)
          Instantiate an object of this class from an Annotation object.
CommentBean(Annotation annotation, long key)
          Instantiates with given annotation and key.
 
Method Summary
 Annotation getAnnotation(EditUserI user)
          Updates the internal annotation with the new values from the form.
 java.lang.String getDescription()
          Returns the annotated text.
 java.lang.String getTopic()
          Returns the topic.
 java.lang.String getTopicLink()
          Returns the topic with a link to show its contents in a window.
 void reset()
          Resets fields to blanks, so the addAnnotation form doesn't display previous values.
 void setDescription(java.lang.String text)
          Sets the annotated text.
 void setTopic(java.lang.String topic)
          Sets the topic.
 
Methods inherited from class uk.ac.ebi.intact.application.editor.struts.view.AbstractEditKeyBean
equals, getKey
 
Methods inherited from class uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
equals, getEditState, getLink, setEditState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentBean

public CommentBean()
Default constructor.

See Also:
reset()

CommentBean

public CommentBean(Annotation annotation)
Instantiate an object of this class from an Annotation object. The key is set to a default value (unique).

Parameters:
annotation - the underlying Annotation object.

CommentBean

public CommentBean(Annotation annotation,
                   long key)
Instantiates with given annotation and key.

Parameters:
annotation - the underlying Annotation object.
key - the key to assigned to this bean.
Method Detail

getAnnotation

public Annotation getAnnotation(EditUserI user)
                         throws SearchException
Updates the internal annotation with the new values from the form. If there is no annotation, a new annotation is created.

Parameters:
user - the user instance to search for a CvTopic object.
Returns:
an Annotation created or updated using values in the bean.
Throws:
SearchException - for errors in searching for a CvTopic.

getTopic

public java.lang.String getTopic()
Returns the topic.

Returns:
topic as a String.

getTopicLink

public java.lang.String getTopicLink()
Returns the topic with a link to show its contents in a window.

Returns:
the topic as a browsable link.

setTopic

public void setTopic(java.lang.String topic)
Sets the topic.

Parameters:
topic - the new topic as a String.

getDescription

public java.lang.String getDescription()
Returns the annotated text.

Returns:
description as a String.

setDescription

public void setDescription(java.lang.String text)
Sets the annotated text.

Parameters:
text - the annotated text as a String.

reset

public void reset()
Resets fields to blanks, so the addAnnotation form doesn't display previous values.

Overrides:
reset in class AbstractEditKeyBean


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