uk.ac.ebi.intact.application.hierarchView.business.tulip.webService
Class TulipAccessImpl

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.hierarchView.business.tulip.webService.TulipAccessImpl
All Implemented Interfaces:
TulipAccess

public class TulipAccessImpl
extends java.lang.Object
implements TulipAccess

Purpose :
Allows the user to send a TLP file to Tulip and get back the node's coordinate.

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

Constructor Summary
TulipAccessImpl()
           
 
Method Summary
 void cleanErrorMessages()
          Clean message list
 ProteinCoordinate[] getComputedTlpContent(java.lang.String tlpContent, java.lang.String optionMask)
          get the computed TLP content from tulip
 java.lang.String[] getErrorMessages(boolean hasToBeCleaned)
          Allows the user to get messages produced byte the web service
 java.util.Collection parseOutputFile(java.lang.String anOutputFile)
          Parse the Tulip conputed TLP file to grab coordinates of each protein Here is the format of the section to parse : (property 0 layout "viewLayout" (default "(105.000000,966.000000,359.000000)" "()" ) (node 1 "(215.500000,7.000000,0.000000)") (node 2 "(57.500000,-288.000000,0.000000)") (node 3 "(40.500000,191.000000,0.000000)") (...) )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TulipAccessImpl

public TulipAccessImpl()
Method Detail

getComputedTlpContent

public ProteinCoordinate[] getComputedTlpContent(java.lang.String tlpContent,
                                                 java.lang.String optionMask)
get the computed TLP content from tulip

Specified by:
getComputedTlpContent in interface TulipAccess
Parameters:
tlpContent - tlp content to compute
optionMask - the option of the Tulip process
Returns:
the computed tlp file content or null if an error occurs.

getErrorMessages

public java.lang.String[] getErrorMessages(boolean hasToBeCleaned)
Allows the user to get messages produced byte the web service

Specified by:
getErrorMessages in interface TulipAccess
Parameters:
hasToBeCleaned - delete all messages after sended them back to the client
Returns:
an array of messages or null if no messages are stored.

cleanErrorMessages

public void cleanErrorMessages()
Clean message list

Specified by:
cleanErrorMessages in interface TulipAccess

parseOutputFile

public java.util.Collection parseOutputFile(java.lang.String anOutputFile)
Parse the Tulip conputed TLP file to grab coordinates of each protein Here is the format of the section to parse : (property 0 layout "viewLayout" (default "(105.000000,966.000000,359.000000)" "()" ) (node 1 "(215.500000,7.000000,0.000000)") (node 2 "(57.500000,-288.000000,0.000000)") (node 3 "(40.500000,191.000000,0.000000)") (...) )

Parameters:
anOutputFile - the path of the file to read
Returns:
a collection of ProteinCoordinate


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