uk.ac.ebi.intact.application.hierarchView.highlightment.source
Class GoHighlightmentSource

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.hierarchView.highlightment.source.HighlightmentSource
        |
        +--uk.ac.ebi.intact.application.hierarchView.highlightment.source.GoHighlightmentSource

public class GoHighlightmentSource
extends HighlightmentSource

Interface allowing to wrap an highlightment source.

Author:
Samuel Kerrien (skerrien@ebi.ac.uk)

Constructor Summary
GoHighlightmentSource()
           
 
Method Summary
 java.lang.String getHtmlCodeOption(javax.servlet.http.HttpSession aSession)
          Return the html code for specific options of the source to integrate int the highlighting form.
 java.util.Collection getKeysFromIntAct(java.lang.String aProteinAC, javax.servlet.http.HttpSession aSession)
          Return a collection of keys specific to the selected protein and the current source.
 java.util.List getSourceUrls(java.util.Collection xRefs, java.util.Collection selectedXRefs, java.lang.String applicationPath)
          Return a collection of URL corresponding to the selected protein and source eg.
 java.util.Collection parseKeys(java.lang.String someKeys)
          Parse the set of key generate by the source and give back a collection of keys.
 java.util.Collection proteinToHightlight(javax.servlet.http.HttpSession aSession, InteractionNetwork aGraph)
          Create a set of protein we must highlight in the graph given in parameter.
 void saveOptions(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpSession aSession)
          Allows to update the session object with parameters' request.
 
Methods inherited from class uk.ac.ebi.intact.application.hierarchView.highlightment.source.HighlightmentSource
getHighlightmentSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoHighlightmentSource

public GoHighlightmentSource()
Method Detail

getHtmlCodeOption

public java.lang.String getHtmlCodeOption(javax.servlet.http.HttpSession aSession)
Return the html code for specific options of the source to integrate int the highlighting form. if the method return null, the source hasn't options.

Specified by:
getHtmlCodeOption in class HighlightmentSource
Parameters:
aSession - the current session.
Returns:
the html code for specific options of the source.

getKeysFromIntAct

public java.util.Collection getKeysFromIntAct(java.lang.String aProteinAC,
                                              javax.servlet.http.HttpSession aSession)
Return a collection of keys specific to the selected protein and the current source. e.g. If the source is GO, we will send the collection of GO term owned by the given protein. Those informations are retreived from the Intact database

Specified by:
getKeysFromIntAct in class HighlightmentSource
Parameters:
aProteinAC - a protein identifier (AC)
aSession - session in which we'll retreive the datasource
Returns:
a set of keys (this keys are a String) (this Keys are a String[] which contains the GOterm and a description)

proteinToHightlight

public java.util.Collection proteinToHightlight(javax.servlet.http.HttpSession aSession,
                                                InteractionNetwork aGraph)
Create a set of protein we must highlight in the graph given in parameter. The protein selection is done according to the source keys stored in the IntactUser. Keys are GO terms, so we select (and highlight) every protein which awned that GO term. If the children option is activated, all proteins which owned a children of the selected GO term are selected.

Specified by:
proteinToHightlight in class HighlightmentSource
Parameters:
aSession - the session where to find selected keys.
aGraph - the graph we want to highlight
Returns:
a collection of node to highlight

saveOptions

public void saveOptions(javax.servlet.http.HttpServletRequest aRequest,
                        javax.servlet.http.HttpSession aSession)
Allows to update the session object with parameters' request. These parameters are specific of the implementation.

Specified by:
saveOptions in class HighlightmentSource
Parameters:
aRequest - request in which we have to get parameters to save in the session
aSession - session in which we have to save the parameter

getSourceUrls

public java.util.List getSourceUrls(java.util.Collection xRefs,
                                    java.util.Collection selectedXRefs,
                                    java.lang.String applicationPath)
                             throws IntactException
Description copied from class: HighlightmentSource
Return a collection of URL corresponding to the selected protein and source eg. produce a list of GO terms if GO is the source.
if the method send back no URL, the given parameter is wrong.

Specified by:
getSourceUrls in class HighlightmentSource
Parameters:
xRefs - The collection of XRef from which we want to get the list of corresponding URL
selectedXRefs - The collection of selected XRef
applicationPath - our application path
Returns:
a set of URL pointing on the highlightment source.
IntactException

parseKeys

public java.util.Collection parseKeys(java.lang.String someKeys)
Parse the set of key generate by the source and give back a collection of keys.

Specified by:
parseKeys in class HighlightmentSource
Parameters:
someKeys - a string which contains some key separates by a character.
Returns:
the splitted version of the key string as a collection of String.


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