Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes

MascotRemoteQuery Class Reference

Class which handles the communication between OpenMS and the Mascot server. More...

#include <OpenMS/FORMAT/MascotRemoteQuery.h>

Inheritance diagram for MascotRemoteQuery:
QObject DefaultParamHandler

List of all members.

Public Slots

void run ()

Signals

void done ()
void loginDone ()
void queryDone ()

Public Member Functions

void setQuerySpectra (const String &exp)
 sets the query spectra, given in MGF file format
const QByteArray & getMascotXMLResponse () const
 returns the Mascot XML response which contains the identifications
bool hasError () const
 predicate which returns true if an error occurred during the query
const StringgetErrorMessage () const
 returns the error message, if hasError can be used to check whether an error has occurred
Constructors and destructors

 MascotRemoteQuery (QObject *parent=0)
 default constructor
virtual ~MascotRemoteQuery ()
 destructor

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method.

Private Slots

void timedOut ()
void readyReadSlot (const QHttpResponseHeader &resp)
void httpRequestFinished (int request_id, bool error)
void httpDataReadProgress (int bytes_read, int bytes_total)
 slot connected to signal dataReadProgress of QHttp
void httpDataSendProgress (int bytes_sent, int bytes_total)
 slot connected to signal dataSendProgress of QHttp
void httpRequestStarted (int request_id)
 slot connected to signal requestStarted of QHttp, which indicates that the processing of request request_id has been started
void httpStateChanged (int state)
void httpDone (bool error)
 slot connected to signal done of QHttp
void readResponseHeader (const QHttpResponseHeader &response_header)
 slot connect to responseHeaderRecieved, which indicates that a new response header is available
void login ()
void execQuery ()
void getResults ()
void loginSuccess ()

Private Member Functions

MascotRemoteQueryoperator= (const MascotRemoteQuery &rhs)
 assignment operator
 MascotRemoteQuery (const MascotRemoteQuery &rhs)
 copy constructor
void endRun_ ()

Private Attributes

String query_spectra_
QByteArray mascot_xml_
QHttp * http_
QString results_path_
QString cookie_
String error_message_
QTimer timeout_
Int to_

Detailed Description

Class which handles the communication between OpenMS and the Mascot server.

This class provides a communication interface which is able to query the Mascot server and reports the identifications provided be the Mascot server

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
hostname string  Address of the host where Mascot listens, e.g. 'mascot-server' or '127.0.0.1'
host_port int80 min: 0Port where the Mascot server listens, 80 should be a good guess
server_path stringmascot  Path on the server where Mascot server listens, 'mascot' should be a good guess
timeout int1500 min: 0Timeout in seconds, after which the query is declared as failed.This is NOT the whole time the search takes, but the time in between two progress steps. Some Mascot servers freeze during this (unstable network etc) and idle forever, the connection is killed. Set this to 0 to disable timeout!
boundary stringGZWgAaYKjHFeUaLOLEIOMq  Boundary for the MIME section
use_proxy stringfalse true, falseFlag which enables the proxy usage for the http requests, please specify at least 'proxy_host' and 'proxy_port'
proxy_host string  Host where the proxy server runs on
proxy_port int0 min: 0Port where the proxy server listens
proxy_username string  Login name for the proxy server, if needed
proxy_password string  Login password for the proxy server, if needed
login stringfalse true, falseFlag which should be set 'true' if Mascot security is enabled; also set 'username' and 'password' then.
username string  Name of the user if login is used (Mascot security must be enabled!)
password string  Password of the user if login is used (Mascot security must be enabled!)
query_master stringfalse true, falseIf this option is set to true, query peptides will be returned with non-truncated lists, however, protein references of peptides will not be correct.
max_hits int0 min: 0Maximum number of hits to be exported from the server to XML (0 = AUTO)

Note:

Constructor & Destructor Documentation

MascotRemoteQuery ( QObject parent = 0  ) 

default constructor

virtual ~MascotRemoteQuery (  )  [virtual]

destructor

MascotRemoteQuery ( const MascotRemoteQuery rhs  )  [private]

copy constructor


Member Function Documentation

void done (  )  [signal]
void endRun_ (  )  [private]
void execQuery (  )  [private, slot]
const String& getErrorMessage (  )  const

returns the error message, if hasError can be used to check whether an error has occurred

const QByteArray& getMascotXMLResponse (  )  const

returns the Mascot XML response which contains the identifications

void getResults (  )  [private, slot]
bool hasError (  )  const

predicate which returns true if an error occurred during the query

void httpDataReadProgress ( int  bytes_read,
int  bytes_total 
) [private, slot]

slot connected to signal dataReadProgress of QHttp

void httpDataSendProgress ( int  bytes_sent,
int  bytes_total 
) [private, slot]

slot connected to signal dataSendProgress of QHttp

void httpDone ( bool  error  )  [private, slot]

slot connected to signal done of QHttp

void httpRequestFinished ( int  request_id,
bool  error 
) [private, slot]

slot connected to signal requestFinished of QHttp: "This signal is emitted when processing the request identified by id has finished. error is true if an error occurred during the processing; otherwise error is false"

void httpRequestStarted ( int  request_id  )  [private, slot]

slot connected to signal requestStarted of QHttp, which indicates that the processing of request request_id has been started

void httpStateChanged ( int  state  )  [private, slot]

slot connected to signal stateChanged of QHttp, which is emitted if the http state changed. See 'enum QHttp::State' of Qt docu for more info.

void login (  )  [private, slot]
void loginDone (  )  [signal]
void loginSuccess (  )  [private, slot]
MascotRemoteQuery& operator= ( const MascotRemoteQuery rhs  )  [private]

assignment operator

void queryDone (  )  [signal]
void readResponseHeader ( const QHttpResponseHeader &  response_header  )  [private, slot]

slot connect to responseHeaderRecieved, which indicates that a new response header is available

void readyReadSlot ( const QHttpResponseHeader &  resp  )  [private, slot]
void run (  )  [slot]
void setQuerySpectra ( const String exp  ) 

sets the query spectra, given in MGF file format

void timedOut (  )  [private, slot]
virtual void updateMembers_ (  )  [protected, virtual]

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.


Member Data Documentation

QString cookie_ [private]
QHttp* http_ [private]
QByteArray mascot_xml_ [private]
QString results_path_ [private]
QTimer timeout_ [private]
Int to_ [private]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:54 using doxygen 1.7.1