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

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.XreferenceBean
All Implemented Interfaces:
java.io.Serializable

public class XreferenceBean
extends AbstractEditKeyBean

Bean to store data for x'references.

Version:
$Id: XreferenceBean.java,v 1.16 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
XreferenceBean()
          Default constructor.
XreferenceBean(Xref xref)
          Instantiate an object of this class from a Xref object.
XreferenceBean(Xref xref, long key)
          Instantiates with given xref and key.
 
Method Summary
 java.lang.String getDatabase()
          Return the database name.
 java.lang.String getDatabaseLink()
          Returns the database with a link to show its contents in a window.
 java.lang.String getPrimaryId()
          Return the primary id.
 java.lang.String getPrimaryIdLink()
          Return the primary id as a link.
 java.lang.String getQualifier()
          Return the reference qualifier.
 java.lang.String getQualifierLink()
          Returns the qualifier with a link to show its contents in a window.
 java.lang.String getReleaseNumber()
          Return the release number.
 java.lang.String getSecondaryId()
          Return the secondary id.
 Xref getXref(EditUserI user)
          Updates the internal xref with the new values from the form.
 void reset()
          Resets fields to blanks, so the addXref form doesn't display previous values.
 void setDatabase(java.lang.String dbname)
          Sets the database name.
 org.apache.struts.action.ActionErrors setFromGoServer(EditUserI user)
          Sets Secondary id and Qualifier values from the Go Server using PrimaryId.
 void setPrimaryId(java.lang.String primaryId)
          Sets the primary id.
 void setQualifier(java.lang.String refQualifier)
          Sets the reference qualifier.
 void setReleaseNumber(java.lang.String releaseNumber)
          Sets the release number.
 void setSecondaryId(java.lang.String secondaryId)
          Sets the secondary id.
 
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

XreferenceBean

public XreferenceBean()
Default constructor.


XreferenceBean

public XreferenceBean(Xref xref)
Instantiate an object of this class from a Xref object.

Parameters:
xref - the Xref object to construct an instance of this class.

XreferenceBean

public XreferenceBean(Xref xref,
                      long key)
Instantiates with given xref and key.

Parameters:
xref - the underlying Xref object.
key - the key to assigned to this bean.
Method Detail

getXref

public Xref getXref(EditUserI user)
             throws SearchException
Updates the internal xref with the new values from the form.

Parameters:
user - the user instance to search for a cv database and xref qualifier.
Throws:
SearchException - for errors in searching the database.

getDatabase

public java.lang.String getDatabase()
Return the database name.


getDatabaseLink

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

Returns:
the database as a browsable link.

setDatabase

public void setDatabase(java.lang.String dbname)
Sets the database name.

Parameters:
dbname - the name of the database.

getPrimaryIdLink

public java.lang.String getPrimaryIdLink()
Return the primary id as a link. Only used when viewing a xref.


getPrimaryId

public java.lang.String getPrimaryId()
Return the primary id. Used for editing the data (not the link).


setPrimaryId

public void setPrimaryId(java.lang.String primaryId)
Sets the primary id.

Parameters:
primaryId - the primary id as a String; any excess blanks are trimmed as this is set from values entered into a free input text box.

getSecondaryId

public java.lang.String getSecondaryId()
Return the secondary id.


setSecondaryId

public void setSecondaryId(java.lang.String secondaryId)
Sets the secondary id.

Parameters:
secondaryId - the primary id as a String.

getReleaseNumber

public java.lang.String getReleaseNumber()
Return the release number.


setReleaseNumber

public void setReleaseNumber(java.lang.String releaseNumber)
Sets the release number.

Parameters:
releaseNumber - the release number as a String.

getQualifier

public java.lang.String getQualifier()
Return the reference qualifier.


getQualifierLink

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

Returns:
the qualifier as a browsable link.

setQualifier

public void setQualifier(java.lang.String refQualifier)
Sets the reference qualifier.

Parameters:
refQualifier - the reference qaulifier as a String.

setFromGoServer

public org.apache.struts.action.ActionErrors setFromGoServer(EditUserI user)
Sets Secondary id and Qualifier values from the Go Server using PrimaryId.

Parameters:
user - the user to access the Go server.
Returns:
non null for errors in accessing the Go server.

reset

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

Overrides:
reset in class AbstractEditKeyBean


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