|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Provides methods specific to a user editing an Annotated object.
| Method Summary | |
void |
addToCurrentExperiment(Experiment exp)
Adds the experiment to the currently edited/added experiment list. |
void |
addToCurrentInteraction(Interaction intact)
Adds the interaction to the currently edited/added interaction list. |
void |
addToSearchCache(java.util.Collection results)
Collection of AnnotatedObjects to add to the search cache. |
void |
begin()
|
void |
cancelEdit()
|
void |
commit()
|
void |
create(java.lang.Object object)
|
void |
delete()
This method clears the view of the current edit object, remove it from the search cache, deletes from the experiment list (if the current edit is an instance of an Experiment class), tand finally delete the current edit object. |
void |
delete(java.lang.Object object)
|
void |
fillSearchResult(org.apache.commons.beanutils.DynaBean dynaForm)
Popluate the given form with search result. |
Annotation |
getAnnotation(CommentBean cb)
Returns an Annotation constructed from the given bean. |
java.util.Set |
getCurrentExperiments()
Returns a list of currently edited/added experiments. |
java.util.Set |
getCurrentInteractions()
Returns a list of currently edited/added interactions. |
GoServerProxy |
getGoProxy()
Returns the Go server proxy assigned for the current session. |
java.lang.String |
getHelpTag()
Returns the help tag for the current view bean. |
Institution |
getInstitution()
Returns the Institution. |
NewtServerProxy |
getNewtProxy()
Returns the Newt server proxy assigned for the current session. |
java.lang.Object |
getObjectByAc(java.lang.Class clazz,
java.lang.String ac)
Return an Object by ac for given class. |
java.lang.Object |
getObjectByLabel(java.lang.Class clazz,
java.lang.String label)
Return an Object by classname and shortLabel. |
java.lang.Object |
getObjectByLabel(java.lang.String className,
java.lang.String label)
Return an Object by classname and shortLabel. |
java.lang.Exception |
getProteinParseException()
Returns the last protein parse exception. |
java.lang.String |
getSearchQuery()
Returns the latest search query. |
java.util.List |
getSearchResult()
Returns the search result as a list. |
java.lang.String |
getSelectedTopic()
|
java.util.Collection |
getSPTRProteins(java.lang.String pid)
Gets SPTR Proteins via SRS. |
java.lang.String |
getUniqueShortLabel(java.lang.String shortlabel)
Returns a unique short label. |
java.lang.String |
getUniqueShortLabel(java.lang.String shortlabel,
java.lang.String extAc)
Returns a unique short label. |
AbstractEditViewBean |
getView()
Returns the user's current edit view. |
Xref |
getXref(XreferenceBean xb)
Returns a new instance of Xref constructed from the given bean. |
boolean |
isEditing()
Returns the state of editing. |
boolean |
isPersistent()
True if the current edit object is persistent. |
boolean |
isPersistent(java.lang.Object obj)
True if given object is persistent. |
java.util.Date |
loginTime()
|
void |
logoff()
Logs off from the application. |
java.util.Date |
logoffTime()
|
java.util.Collection |
lookup(java.lang.String className,
java.lang.String value)
Utility method to handle the logic for lookup, ie trying AC, label etc. |
void |
persist()
Persists the object the user is editing. |
void |
releaseLock()
Releases the lock held by the user. |
void |
removeFromCurrentExperiment(Experiment exp)
Removes the current experiment from the currently edited/added experiment list. |
void |
removeFromCurrentInteraction(Interaction intact)
Removes the current interaction from the currently edited/added interaction list. |
void |
rollback()
|
java.util.Collection |
search1(java.lang.String objectType,
java.lang.String searchParam,
java.lang.String searchValue)
This method provides a means of searching intact objects, within the constraints provided by the parameters to the method. |
void |
setSelectedTopic(java.lang.String topic)
|
void |
setView(java.lang.Object obj)
Sets the view using given object. |
boolean |
shortLabelExists(java.lang.String shortlabel)
Check for duplicity of short label for the current edit object. |
void |
startEditing()
Starts editing session. |
void |
update(java.lang.Object object)
|
void |
updateSearchCache(AnnotatedObject annotobj)
Clears existing search cache and replace it with given bean. |
| Methods inherited from interface uk.ac.ebi.intact.application.commons.business.IntactUserI |
getDatabaseName, getUserName, search |
| Method Detail |
public java.lang.String getSelectedTopic()
public void setSelectedTopic(java.lang.String topic)
public Institution getInstitution()
public boolean isEditing()
true if the user is in edit screen;
false is returned for all other instances.public void startEditing()
public void begin()
throws IntactException
IntactException
public void commit()
throws IntactException
IntactException
public void rollback()
throws IntactException
IntactException
public void create(java.lang.Object object)
throws IntactException
IntactException
public void update(java.lang.Object object)
throws IntactException
IntactException
public void delete(java.lang.Object object)
throws IntactException
IntactException
public void persist()
throws IntactException,
SearchException
IntactException - for errors in updating the persistent system.
SearchException - for search errors (unable to find an object
to update).
public void delete()
throws IntactException
IntactException - for errors in deleting the current edit object.public void cancelEdit()
public boolean isPersistent(java.lang.Object obj)
obj - the object to check for persistency.
obj is persistent.public boolean isPersistent()
public AbstractEditViewBean getView()
public void setView(java.lang.Object obj)
obj - either an Annotated object or a Class. The class type is used
when creating a view for a new object. For an existing object,
AnnotatedObject is used.
public java.lang.Object getObjectByLabel(java.lang.String className,
java.lang.String label)
throws SearchException
className - the name of the class to search.label - the short label to search for.
SearchException - thrown for a search failure; also thrown
if label already exists in className.
public java.lang.Object getObjectByLabel(java.lang.Class clazz,
java.lang.String label)
throws SearchException
clazz - the class object to search.label - the short label to search for.
SearchException - thrown for a search failure; also thrown
if label occurrs more than once for clazz.
public java.lang.Object getObjectByAc(java.lang.Class clazz,
java.lang.String ac)
throws SearchException
clazz - the class to search for.ac - the accession number to search for.
clazz type for ac.
SearchException - thrown for a search failure; also thrown
if ac occurs more than once for clazz; highly
unlikely given that ac is the primary key!public java.util.Collection getSPTRProteins(java.lang.String pid)
pid - the primary id to search for.
Protein instances for pid.public java.lang.Exception getProteinParseException()
public java.util.Collection search1(java.lang.String objectType,
java.lang.String searchParam,
java.lang.String searchValue)
throws SearchException
This method is named as search1 to avoid conflict with the similar named method (with diffrent exception) of the super interface.
objectType - the object type to be searchedsearchParam - the parameter to search on (eg field)searchValue - the search value to match with the parameter
SearchException - thrown if problems are encountered during the
search process.
public java.util.Collection lookup(java.lang.String className,
java.lang.String value)
throws SearchException
className - the intact type to search onvalue - the user-specified value.
SearchException - thrown if there were any search problemspublic java.lang.String getSearchQuery()
public void addToSearchCache(java.util.Collection results)
results - a collection of AnnotatedObjects from
the search.
pre: results->forall(obj: Object | obj.oclIsTypeOf(AnnotatedObjects))
public void updateSearchCache(AnnotatedObject annotobj)
annotobj - the AnnotatedObject to set as the search cache.
public java.lang.String getUniqueShortLabel(java.lang.String shortlabel)
throws SearchException
shortlabel - the new short label.
String instance. This
could be shortlabel if it is unique or current object's
AC for otherwise.
SearchException - for problems with searching the database.getUniqueShortLabel(String, String)
public java.lang.String getUniqueShortLabel(java.lang.String shortlabel,
java.lang.String extAc)
throws SearchException
shortlabel - the new short label.extAc - the external ac to be used if shortlabel is not
unique.
String instance.
SearchException - for problems with searching the database.GoTools.getUniqueShortLabel(
uk.ac.ebi.intact.business.IntactHelper, Class, String, String, String)
public boolean shortLabelExists(java.lang.String shortlabel)
throws SearchException
shortlabel - the short label to check for duplicity.
shortlabel already exists (for the current edit object)
in the database.
SearchException - for errors in acccessing the database.public void fillSearchResult(org.apache.commons.beanutils.DynaBean dynaForm)
dynaForm - the form to populate.public java.util.List getSearchResult()
post: return != Null post: return->forall(obj: Object | obj.oclIsTypeOf(ResultBean))
public NewtServerProxy getNewtProxy()
public GoServerProxy getGoProxy()
public java.lang.String getHelpTag()
public void logoff()
throws IntactException
IntactException - for problems with logging off.public java.util.Date loginTime()
public java.util.Date logoffTime()
public void addToCurrentExperiment(Experiment exp)
exp - the experiment to add to the list.public void removeFromCurrentExperiment(Experiment exp)
exp - the experiment to remove from the list.public java.util.Set getCurrentExperiments()
post: results->forall(obj: Object | obj.oclIsTypeOf(Experiment))
public void addToCurrentInteraction(Interaction intact)
intact - the interaction to add to the list.public void removeFromCurrentInteraction(Interaction intact)
intact - the interaction to remove from the list.public java.util.Set getCurrentInteractions()
post: results->forall(obj: Object | obj.oclIsTypeOf(Interaction))
public Annotation getAnnotation(CommentBean cb)
throws SearchException
Annotation constructed from the given bean.
cb - the bean to extract information to construct an Anotation.
cb.
SearchException - for errors in searching the database.
public Xref getXref(XreferenceBean xb)
throws SearchException
Xref constructed from the given bean.
xb - the bean to extract information to construct an Xref.
Xref constructed from xb.
SearchException - for errors in searching the database.public void releaseLock()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||