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

QcMLFile Class Reference
[File IO]

File adapter for QcML files. More...

#include <OpenMS/FORMAT/QcMLFile.h>

Inheritance diagram for QcMLFile:
XMLHandler XMLFile ProgressLogger DefaultHandler

List of all members.

Classes

struct  Attachment
 Representation of an attachment. More...
struct  QualityParameter
 Representation of a quality parameter. More...

Public Member Functions

 QcMLFile ()
 Default constructor.
 ~QcMLFile ()
 Destructor.
String map2cvs (const std::map< String, std::map< String, String > > &cvs_table, const String &separator) const
String exportIDstats (const String &filename) const
void addRunQualityParameter (String r, QualityParameter qp)
 Just adds a qualityparameter to run by the name r.
void addRunAttachment (String r, Attachment at)
 Just adds a attachment to run by the name r.
void addSetQualityParameter (String r, QualityParameter qp)
 Just adds a qualityparameter to set by the name r.
void addSetAttachment (String r, Attachment at)
 Just adds a attachment to set by the name r.
void removeAttachment (String r, std::vector< String > &ids, String at="")
 Removes attachments referencing a id given in ids, from run/set r. All attachments if no attachment name is given with at.
void removeAttachment (String r, String at)
 Removes attachment with cv accession at from run/set r.
void removeAllAttachments (String at)
 Removes attachment with cv accession at from all runs/sets.
void removeQualityParameter (String r, std::vector< String > &ids)
 Just removes qualityparameter going by one of the ID attributes given in ids.
void merge (const QcMLFile &addendum, String setname="")
 merges the given QCFile into this one
void collectSetParameter (const String setname, const String qp, std::vector< String > &ret)
 collects the values of given QPs (as CVid) of the given set
String exportAttachment (const String filename, const String qpname) const
 Returns a String of a tab separated rows if found empty string else from run/set by the name filename of the qualityparameter by the name qpname.
void getRunNames (std::vector< String > &ids) const
 Gives the names of the registered runs in the vector ids.
bool existsRun (const String filename) const
 Returns true if the given run name is present in this file.
bool existsSet (const String filename) const
 Returns true if the given set name is present in this file.
void existsRunQualityParameter (const String filename, const String qpname, std::vector< String > &ids) const
 Returns the ids of the parameter name given if found in given run empty else.
void existsSetQualityParameter (const String filename, const String qpname, std::vector< String > &ids) const
 Returns the ids of the parameter name given if found in given set, empty else.
void store (const String &filename) const
 Store the QCFile.
void load (const String &filename)
 Load a QCFile.

Protected Member Functions

virtual void endElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname)
virtual void startElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname, const xercesc::Attributes &attributes)
virtual void characters (const XMLCh *const chars, const XMLSize_t length)

Protected Attributes

std::map< String, std::vector
< QualityParameter > > 
runQualityQPs_
std::map< String, std::vector
< Attachment > > 
runQualityAts_
std::map< String, std::vector
< QualityParameter > > 
setQualityQPs_
std::map< String, std::vector
< Attachment > > 
setQualityAts_
std::map< String, std::set
< String > > 
setQualityQPs_members_
String tag_
UInt progress_
QualityParameter qp_
Attachment at_
std::vector< Stringrow_
std::vector< Stringheader_
String name_
std::set< Stringnames_
std::vector< QualityParameterqps_
std::vector< Attachmentats_

Detailed Description

File adapter for QcML files.

This Class is supposed to internally collect the data for the qcML File


Constructor & Destructor Documentation

QcMLFile (  ) 

Default constructor.

~QcMLFile (  ) 

Destructor.


Member Function Documentation

void addRunAttachment ( String  r,
Attachment  at 
)

Just adds a attachment to run by the name r.

void addRunQualityParameter ( String  r,
QualityParameter  qp 
)

Just adds a qualityparameter to run by the name r.

void addSetAttachment ( String  r,
Attachment  at 
)

Just adds a attachment to set by the name r.

void addSetQualityParameter ( String  r,
QualityParameter  qp 
)

Just adds a qualityparameter to set by the name r.

virtual void characters ( const XMLCh *const   chars,
const XMLSize_t  length 
) [protected, virtual]
void collectSetParameter ( const String  setname,
const String  qp,
std::vector< String > &  ret 
)

collects the values of given QPs (as CVid) of the given set

virtual void endElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname 
) [protected, virtual]
bool existsRun ( const String  filename  )  const

Returns true if the given run name is present in this file.

void existsRunQualityParameter ( const String  filename,
const String  qpname,
std::vector< String > &  ids 
) const

Returns the ids of the parameter name given if found in given run empty else.

bool existsSet ( const String  filename  )  const

Returns true if the given set name is present in this file.

void existsSetQualityParameter ( const String  filename,
const String  qpname,
std::vector< String > &  ids 
) const

Returns the ids of the parameter name given if found in given set, empty else.

String exportAttachment ( const String  filename,
const String  qpname 
) const

Returns a String of a tab separated rows if found empty string else from run/set by the name filename of the qualityparameter by the name qpname.

String exportIDstats ( const String filename  )  const
void getRunNames ( std::vector< String > &  ids  )  const

Gives the names of the registered runs in the vector ids.

void load ( const String filename  ) 

Load a QCFile.

String map2cvs ( const std::map< String, std::map< String, String > > &  cvs_table,
const String separator 
) const
void merge ( const QcMLFile addendum,
String  setname = "" 
)

merges the given QCFile into this one

void removeAllAttachments ( String  at  ) 

Removes attachment with cv accession at from all runs/sets.

void removeAttachment ( String  r,
String  at 
)

Removes attachment with cv accession at from run/set r.

void removeAttachment ( String  r,
std::vector< String > &  ids,
String  at = "" 
)

Removes attachments referencing a id given in ids, from run/set r. All attachments if no attachment name is given with at.

void removeQualityParameter ( String  r,
std::vector< String > &  ids 
)

Just removes qualityparameter going by one of the ID attributes given in ids.

virtual void startElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname,
const xercesc::Attributes &  attributes 
) [protected, virtual]
void store ( const String filename  )  const

Store the QCFile.


Member Data Documentation

Attachment at_ [protected]
std::vector<Attachment> ats_ [protected]
std::vector<String> header_ [protected]
String name_ [protected]
std::set<String> names_ [protected]
UInt progress_ [protected]
QualityParameter qp_ [protected]
std::vector<QualityParameter> qps_ [protected]
std::vector<String> row_ [protected]
std::map<String, std::vector< Attachment > > runQualityAts_ [protected]
std::map<String, std::vector< QualityParameter > > runQualityQPs_ [protected]
std::map<String, std::vector< Attachment > > setQualityAts_ [protected]
std::map<String, std::vector< QualityParameter > > setQualityQPs_ [protected]
std::map<String, std::set< String > > setQualityQPs_members_ [protected]
String tag_ [protected]

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