|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uk.ac.ebi.intact.application.editor.struts.framework.util.AbstractEditViewBean
|
+--uk.ac.ebi.intact.application.editor.struts.view.interaction.InteractionViewBean
Interaction edit view bean.
| Constructor Summary | |
InteractionViewBean()
|
|
| Method Summary | |
void |
addExperiment(ExperimentBean expbean)
Adds an Experiment. |
void |
addExperimentToHold(java.util.Collection exps)
Adds an Experiment bean to hold if the new experiment doesn't already exists in the experiment hold collection and in the current experiment collection for this interaction. |
void |
addProtein(Protein protein)
Adds an Protein. |
void |
addProteinToUpdate(ProteinBean pb)
Adds a Protein bean to update. |
void |
addToRecentList(EditUserI user)
Adds the current edit object to the recent edited item list. |
void |
clear()
Deletes all the links to sub objects of the current edit object. |
void |
clearExperimentToHold()
Clears all the experiments on hold. |
void |
clearTransactions()
Clears any pending xrefs and annotations stored in the transaction containers. |
void |
delExperiment(ExperimentBean expbean)
Removes an Experiment |
void |
delProtein(int pos)
Removes a Protein from given position. |
boolean |
experimentExists(ExperimentBean expbean)
True if given experiment exists in this object's experiment collection. |
java.util.List |
getAddBioSourceMenu()
|
java.util.List |
getAddProteinRoleMenu()
Returns the add menu for a Protein role. |
java.util.List |
getEditProteinRoleMenu()
Returns the edit menu for a Protein role. |
ExperimentBean |
getExperiment(int index)
Returns an ExperimentBean at given location. |
java.util.List |
getExperiments()
Returns a collection of ExperimentBean objects. |
java.lang.String |
getHelpTag()
Returns the help tag link for the current view bean; subclasses must override this method to return the help tag (if necessary) or else the link to the CV editor is returned. |
ExperimentBean |
getHoldExperiment(int index)
Returns an ExperimentBean from a collection of
'hold' experiments at given location. |
java.util.List |
getHoldExperiments()
Returns a collection of ExperimentBean objects on hold. |
java.lang.String |
getInteractionType()
|
java.util.List |
getInteractionTypeMenu()
The interaction type menu list. |
java.lang.Float |
getKD()
|
java.lang.String |
getOrganism()
|
java.util.List |
getOrganismMenu()
The organism menu list. |
ProteinBean |
getProtein(int index)
Returns a ProteinBean at given location. |
java.util.List |
getProteins()
Returns a collection of ProteinBean objects. |
java.lang.String |
getSourceExperimentAc()
Returns the AC of the source experiment. |
boolean |
hasDuplicates(ProteinBean pb)
True if given protein bean already exists among current saved proteins. |
void |
hideExperimentToHold(ExperimentBean expbean)
Hides an Experiment bean from hold. |
boolean |
isSourceFromAnExperiment()
True when this bean is constructed from an experiment. |
void |
persistOthers(EditUserI user)
Persist any sub objects of the edited object. |
void |
removeFromRecentList(EditUserI user)
Removes the current edit object from the recent edited item list. |
void |
removeUnsavedProteins()
Removes all the unsaved proteins for the current protein collection. |
protected void |
reset(AnnotatedObject annobj)
Resets with the bean using an existing Annotated object. |
protected void |
reset(java.lang.Class clazz)
Resets the bean with the current edit class. |
void |
sanityCheck(EditUserI user)
Performs sanity check on a bean. |
void |
setInteractionType(java.lang.String interaction)
|
void |
setKD(java.lang.Float kd)
|
void |
setLayout(org.apache.struts.tiles.ComponentContext context)
Sets the layout in given context. |
void |
setOrganism(java.lang.String organism)
|
void |
setSourceExperimentAc(java.lang.String ac)
Set the AC of the source experiment. |
protected void |
updateAnnotatedObject(EditUserI user)
Gathers values in the view bean and updates the existing AnnotatedObject if it exists or create a new annotated object for the view and sets the annotated object. |
void |
updateFromForm(org.apache.struts.action.DynaActionForm dynaform)
Updates the internal data from given form. |
void |
validate(EditUserI user)
Validates the data in the view bean. |
| Methods inherited from class uk.ac.ebi.intact.application.editor.struts.framework.util.AbstractEditViewBean |
addAnnotation, addXref, delAnnotation, delXref, equals, getAc, getAcLink, getAddDatabaseMenu, getAddTopicMenu, getAddXrefMenus, getAnnotatedObject, getAnnotations, getDefaultXrefQualifier, getEditClass, getEditDatabaseMenu, getEditorMenus, getEditTopicMenu, getEditXrefMenus, getFullName, getMenuFactory, getReadOnly, getShortLabel, getXrefs, persist, reset, saveComment, saveXref, setAnnotatedObject, setFullName, setMenuFactory, setShortLabel |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InteractionViewBean()
| Method Detail |
protected void reset(java.lang.Class clazz)
AbstractEditViewBean
reset in class AbstractEditViewBeanclazz - the Class of the new annotated object.protected void reset(AnnotatedObject annobj)
AbstractEditViewBean
reset in class AbstractEditViewBeanannobj - AnnotatedObject object to set this bean.
protected void updateAnnotatedObject(EditUserI user)
throws SearchException
AbstractEditViewBean
updateAnnotatedObject in class AbstractEditViewBeanuser - to access the persistent system.
SearchException - for errors in searching the persistent system.
post: getAnnotatedObject() != null
public void persistOthers(EditUserI user)
throws IntactException,
SearchException
AbstractEditViewBean
persistOthers in class AbstractEditViewBeanuser - handler to the user to persist sub objects.
SearchException - for errors in searching for objects in the
persistent system.
IntactException - for errors in persisting.public void addToRecentList(EditUserI user)
AbstractEditViewBean
addToRecentList in class AbstractEditViewBeanuser - the user handle to add to the recent list.public void removeFromRecentList(EditUserI user)
AbstractEditViewBean
removeFromRecentList in class AbstractEditViewBeanuser - the user handle to remove from the recent list.public void clear()
AbstractEditViewBean
clear in class AbstractEditViewBeanpublic void setLayout(org.apache.struts.tiles.ComponentContext context)
AbstractEditViewBean
setLayout in class AbstractEditViewBeancontext - the Tiles context to set the layout.public java.lang.String getHelpTag()
AbstractEditViewBean
getHelpTag in class AbstractEditViewBeanpublic void updateFromForm(org.apache.struts.action.DynaActionForm dynaform)
AbstractEditViewBean
updateFromForm in class AbstractEditViewBeandynaform - the form to update the internal data.
public void sanityCheck(EditUserI user)
throws ValidationException,
SearchException
AbstractEditViewBean
sanityCheck in class AbstractEditViewBeanSearchException - for errors in searching for objects in the
persistent system.
ValidationException - if sanity check fails.
public void validate(EditUserI user)
throws ValidationException,
SearchException
AbstractEditViewBean
validate in class AbstractEditViewBeanuser - handler to the user to access the DB.
ValidationException - thrown when this bean contains invalid data.
For example, an experiment must contain non null values for organism,
interaction and identification. Currently this method is empty as no
validations are preformed.
SearchException
public java.util.List getOrganismMenu()
throws SearchException
SearchException - for errors in generating menus.
public java.util.List getInteractionTypeMenu()
throws SearchException
SearchException - for errors in generating menus.
public java.util.List getEditProteinRoleMenu()
throws SearchException
SearchException - for errors in constructing the menu.
public java.util.List getAddProteinRoleMenu()
throws SearchException
SearchException - for errors in constructing the menu.
public java.util.List getAddBioSourceMenu()
throws SearchException
SearchExceptionpublic void setKD(java.lang.Float kd)
public java.lang.Float getKD()
public void setOrganism(java.lang.String organism)
public java.lang.String getOrganism()
public void setInteractionType(java.lang.String interaction)
public java.lang.String getInteractionType()
public void addExperiment(ExperimentBean expbean)
expbean - the Experiment bean to add.
post: myExperimentsToAdd = myExperimentsToAdd@pre + 1 post: myExperiments = myExperiments@pre + 1
public boolean experimentExists(ExperimentBean expbean)
expbean - the bean to compare.
expbean exists in this object's experiment
collection. The comparision uses the equals method of
ExperimentBean class.
post: return->true implies myExperimentsToAdd.exists(exbean)
public void delExperiment(ExperimentBean expbean)
expbean - the Experiment bean to remove.
post: myExperimentsToDel = myExperimentsToDel@pre - 1 post: myExperiments = myExperiments@pre - 1
public void addExperimentToHold(java.util.Collection exps)
exps - a collection of Experiment to add.
pre: forall(obj : Object | obj.oclIsTypeOf(Experiment))
public void hideExperimentToHold(ExperimentBean expbean)
expbean - an ExperimentBean to hide.
pre: myExperimentsToHold->includes(expbean) post: myExperimentsToHold = myExperimentsToHold@pre - 1
public void clearExperimentToHold()
public java.util.List getExperiments()
ExperimentBean objects.
post: return != null post: return->forall(obj : Object | obj.oclIsTypeOf(ExperimentBean))
public java.util.List getHoldExperiments()
ExperimentBean objects on hold.
post: return != null post: return->forall(obj : Object | obj.oclIsTypeOf(ExperimentBean))
public ExperimentBean getExperiment(int index)
ExperimentBean at given location.
index - the position to return ExperimentBean.
ExperimentBean at index.
pre: index >=0 and index < myExperiments->size post: return != null post: return = myExperiments->at(index)
public ExperimentBean getHoldExperiment(int index)
ExperimentBean from a collection of
'hold' experiments at given location.
index - the position to return ExperimentBean.
ExperimentBean at index from 'hold'
(or experiment not yet added) collection.
pre: index >=0 and index < myExperimentsToHold->size post: return != null post: return = myExperimentsToHold->at(index)
public void addProtein(Protein protein)
protein - the Protein to add.
post: myProteins = myProteins@pre + 1
public void delProtein(int pos)
pos - the position in the current Protein collection.
post: myProteinsToDel = myProteinsToDel@pre + 1 post: myProteins = myProteins@pre - 1
public void addProteinToUpdate(ProteinBean pb)
pb - a ProteinBean object to update.
post: myProteinsToUpdate = myProteinsToUpdate@pre + 1 post: myProteins = myProteins@pre
public void removeUnsavedProteins()
ProteinBean.SAVE_NEW is
considered as unsaved.
public boolean hasDuplicates(ProteinBean pb)
pb - the bean to compare.
public java.util.List getProteins()
ProteinBean objects.
post: return != null post: return->forall(obj : Object | obj.oclIsTypeOf(ProteinBean))
public ProteinBean getProtein(int index)
ProteinBean at given location.
index - the position to return ProteinBean.
ProteinBean at index.
pre: index >=0 and index < myProteins->size post: return != null post: return = myProteins->at(index)
public void clearTransactions()
AbstractEditViewBeanpost: myAnnotsToAdd->isEmpty post: myAnnotsToDel->isEmpty post: myAnnotsToUpdate->isEmpty post: myXrefsToAdd->isEmpty post: myXrefsToDel->isEmpty post: myXrefsToUpdate->isEmpty
clearTransactions in class AbstractEditViewBeanpublic java.lang.String getSourceExperimentAc()
public void setSourceExperimentAc(java.lang.String ac)
ac - the AC of the source experiment.public boolean isSourceFromAnExperiment()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||