![]() |
OpenMS
2.4.0
|
#include <OpenMS/FORMAT/HANDLERS/MzXMLHandler.h>
Classes | |
struct | SpectrumData |
Data necessary to generate a single spectrum. More... | |
Public Member Functions | |
virtual LOADDETAIL | getLoadDetail () const override |
handler which support partial loading, implement this method More... | |
virtual void | setLoadDetail (const LOADDETAIL d) override |
handler which support partial loading, implement this method More... | |
void | endElement (const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname) override |
void | startElement (const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname, const xercesc::Attributes &attributes) override |
void | characters (const XMLCh *const chars, const XMLSize_t length) override |
void | writeTo (std::ostream &os) override |
Write the contents to a stream. More... | |
void | setOptions (const PeakFileOptions &options) |
Sets the options. More... | |
UInt | getScanCount () |
Gets the scan count. More... | |
void | setMSDataConsumer (Interfaces::IMSDataConsumer *consumer) |
Set the IMSDataConsumer consumer which will consume the read data. More... | |
Constructors and destructor | |
MzXMLHandler (MapType &exp, const String &filename, const String &version, ProgressLogger &logger) | |
Constructor for a read-only handler. More... | |
MzXMLHandler (const MapType &exp, const String &filename, const String &version, const ProgressLogger &logger) | |
Constructor for a write-only handler. More... | |
~MzXMLHandler () override | |
Destructor. More... | |
![]() | |
XMLHandler (const String &filename, const String &version) | |
Default constructor. More... | |
~XMLHandler () override | |
Destructor. More... | |
void | reset () |
Release internal memory used for parsing (call. More... | |
void | fatalError (ActionMode mode, const String &msg, UInt line=0, UInt column=0) const |
Fatal error handler. Throws a ParseError exception. More... | |
void | error (ActionMode mode, const String &msg, UInt line=0, UInt column=0) const |
Error handler for recoverable errors. More... | |
void | warning (ActionMode mode, const String &msg, UInt line=0, UInt column=0) const |
Warning handler. More... | |
void | characters (const XMLCh *const chars, const XMLSize_t length) override |
Parsing method for character data. More... | |
void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const xercesc::Attributes &attrs) override |
Parsing method for opening tags. More... | |
void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override |
Parsing method for closing tags. More... | |
String | errorString () |
Returns the last error description. More... | |
void | fatalError (const xercesc::SAXParseException &exception) override |
void | error (const xercesc::SAXParseException &exception) override |
void | warning (const xercesc::SAXParseException &exception) override |
Protected Types | |
typedef MapType::PeakType | PeakType |
Peak type. More... | |
typedef MSSpectrum | SpectrumType |
Spectrum type. More... | |
Protected Member Functions | |
std::ostream & | writeAttributeIfExists_ (std::ostream &os, const MetaInfoInterface &meta, const String &metakey, const String &attname) |
write metaInfo to xml (usually in nameValue-tag) More... | |
void | writeUserParam_ (std::ostream &os, const MetaInfoInterface &meta, int indent=4, String tag="nameValue") |
write metaInfo to xml (usually in nameValue-tag) More... | |
void | doPopulateSpectraWithData_ (SpectrumData &spectrum_data) |
Fill a single spectrum with data from input. More... | |
void | populateSpectraWithData_ () |
Populate all spectra on the stack with data from input. More... | |
![]() | |
bool | equal_ (const XMLCh *a, const XMLCh *b) const |
Returns if two Xerces strings are equal. More... | |
void | writeUserParam_ (const String &tag_name, std::ostream &os, const MetaInfoInterface &meta, UInt indent) const |
Writes the content of MetaInfoInterface to the file. More... | |
Int | asInt_ (const String &in) |
Conversion of a String to an integer value. More... | |
Int | asInt_ (const XMLCh *in) |
Conversion of a Xerces string to an integer value. More... | |
UInt | asUInt_ (const String &in) |
Conversion of a String to an unsigned integer value. More... | |
double | asDouble_ (const String &in) |
Conversion of a String to a double value. More... | |
float | asFloat_ (const String &in) |
Conversion of a String to a float value. More... | |
bool | asBool_ (const String &in) |
Conversion of a string to a boolean value. More... | |
DateTime | asDateTime_ (String date_string) |
Conversion of a xs:datetime string to a DateTime value. More... | |
String | attributeAsString_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to a String. More... | |
Int | attributeAsInt_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to a Int. More... | |
double | attributeAsDouble_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to a double. More... | |
DoubleList | attributeAsDoubleList_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to a DoubleList. More... | |
IntList | attributeAsIntList_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to an IntList. More... | |
StringList | attributeAsStringList_ (const xercesc::Attributes &a, const char *name) const |
Converts an attribute to an StringList. More... | |
bool | optionalAttributeAsString_ (String &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the String value if the attribute is present. More... | |
bool | optionalAttributeAsInt_ (Int &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the Int value if the attribute is present. More... | |
bool | optionalAttributeAsUInt_ (UInt &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the UInt value if the attribute is present. More... | |
bool | optionalAttributeAsDouble_ (double &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the double value if the attribute is present. More... | |
bool | optionalAttributeAsDoubleList_ (DoubleList &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the DoubleList value if the attribute is present. More... | |
bool | optionalAttributeAsStringList_ (StringList &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the StringList value if the attribute is present. More... | |
bool | optionalAttributeAsIntList_ (IntList &value, const xercesc::Attributes &a, const char *name) const |
Assigns the attribute content to the IntList value if the attribute is present. More... | |
String | attributeAsString_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a String. More... | |
Int | attributeAsInt_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a Int. More... | |
double | attributeAsDouble_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a double. More... | |
DoubleList | attributeAsDoubleList_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a DoubleList. More... | |
IntList | attributeAsIntList_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a IntList. More... | |
StringList | attributeAsStringList_ (const xercesc::Attributes &a, const XMLCh *name) const |
Converts an attribute to a StringList. More... | |
bool | optionalAttributeAsString_ (String &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the String value if the attribute is present. More... | |
bool | optionalAttributeAsInt_ (Int &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the Int value if the attribute is present. More... | |
bool | optionalAttributeAsUInt_ (UInt &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the UInt value if the attribute is present. More... | |
bool | optionalAttributeAsDouble_ (double &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the double value if the attribute is present. More... | |
bool | optionalAttributeAsDoubleList_ (DoubleList &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the DoubleList value if the attribute is present. More... | |
bool | optionalAttributeAsIntList_ (IntList &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the IntList value if the attribute is present. More... | |
bool | optionalAttributeAsStringList_ (StringList &value, const xercesc::Attributes &a, const XMLCh *name) const |
Assigns the attribute content to the StringList value if the attribute is present. More... | |
SignedSize | cvStringToEnum_ (const Size section, const String &term, const char *message, const SignedSize result_on_error=0) |
Protected Attributes | |
MapType * | exp_ |
map pointer for reading More... | |
const MapType * | cexp_ |
map pointer for writing More... | |
PeakFileOptions | options_ |
Options for loading and storing. More... | |
bool | skip_spectrum_ |
Flag that indicates whether this spectrum should be skipped (due to options) More... | |
UInt | spec_write_counter_ |
spectrum counter (spectra without peaks are not written) More... | |
Interfaces::IMSDataConsumer * | consumer_ |
Consumer class to work on spectra. More... | |
UInt | scan_count_ |
Consumer class to work on spectra. More... | |
const ProgressLogger & | logger_ |
Progress logging class. More... | |
std::vector< boost::shared_ptr< DataProcessing > > | data_processing_ |
data processing auxiliary variable More... | |
temporary data structures to hold parsed data | |
Int | nesting_level_ |
std::vector< SpectrumData > | spectrum_data_ |
Vector of spectrum data stored for later parallel processing. More... | |
![]() | |
String | error_message_ |
Error message of the last error. More... | |
String | file_ |
File name. More... | |
String | version_ |
Schema version. More... | |
StringManager | sm_ |
Helper class for string conversion. More... | |
std::vector< String > | open_tags_ |
Stack of open XML tags. More... | |
LOADDETAIL | load_detail_ |
parse only until total number of scans and chroms have been determined from attributes More... | |
std::vector< std::vector< String > > | cv_terms_ |
Array of CV term lists (one sublist denotes one term and it's children) More... | |
Private Member Functions | |
MzXMLHandler () | |
Not implemented. More... | |
void | init_ () |
initialize members (call from C'tor) More... | |
void | initStaticMembers_ () |
Static Private Attributes | |
static const XMLCh * | s_value_ |
static const XMLCh * | s_count_ |
static const XMLCh * | s_type_ |
static const XMLCh * | s_name_ |
static const XMLCh * | s_version_ |
static const XMLCh * | s_filename_ |
static const XMLCh * | s_filetype_ |
static const XMLCh * | s_filesha1_ |
static const XMLCh * | s_completiontime_ |
static const XMLCh * | s_precision_ |
static const XMLCh * | s_byteorder_ |
static const XMLCh * | s_contentType_ |
static const XMLCh * | s_compressionType_ |
static const XMLCh * | s_precursorintensity_ |
static const XMLCh * | s_precursorcharge_ |
static const XMLCh * | s_windowwideness_ |
static const XMLCh * | s_mslevel_ |
static const XMLCh * | s_peakscount_ |
static const XMLCh * | s_polarity_ |
static const XMLCh * | s_scantype_ |
static const XMLCh * | s_filterline_ |
static const XMLCh * | s_retentiontime_ |
static const XMLCh * | s_startmz_ |
static const XMLCh * | s_endmz_ |
static const XMLCh * | s_first_ |
static const XMLCh * | s_last_ |
static const XMLCh * | s_phone_ |
static const XMLCh * | s_email_ |
static const XMLCh * | s_uri_ |
static const XMLCh * | s_num_ |
static const XMLCh * | s_intensitycutoff_ |
static const XMLCh * | s_centroided_ |
static const XMLCh * | s_deisotoped_ |
static const XMLCh * | s_chargedeconvoluted_ |
Additional Inherited Members | |
![]() | |
enum | ActionMode { LOAD, STORE } |
Action to set the current mode (for error messages) More... | |
enum | LOADDETAIL { LD_ALLDATA, LD_RAWCOUNTS, LD_COUNTS_WITHOPTIONS } |
![]() | |
static String | writeXMLEscape (const String &to_escape) |
Escapes a string and returns the escaped string. More... | |
|
protected |
Peak type.
|
protected |
Spectrum type.
MzXMLHandler | ( | MapType & | exp, |
const String & | filename, | ||
const String & | version, | ||
ProgressLogger & | logger | ||
) |
Constructor for a read-only handler.
MzXMLHandler | ( | const MapType & | exp, |
const String & | filename, | ||
const String & | version, | ||
const ProgressLogger & | logger | ||
) |
Constructor for a write-only handler.
|
inlineoverride |
Destructor.
|
private |
Not implemented.
|
override |
|
protected |
Fill a single spectrum with data from input.
|
override |
|
overridevirtual |
handler which support partial loading, implement this method
Reimplemented from XMLHandler.
|
inline |
Gets the scan count.
|
private |
initialize members (call from C'tor)
|
private |
|
protected |
Populate all spectra on the stack with data from input.
Will populate all spectra on the current work stack with data (using multiple threads if available) and append them to the result.
|
overridevirtual |
handler which support partial loading, implement this method
Reimplemented from XMLHandler.
|
inline |
Set the IMSDataConsumer consumer which will consume the read data.
|
inline |
Sets the options.
|
override |
|
inlineprotected |
write metaInfo to xml (usually in nameValue-tag)
|
overridevirtual |
Write the contents to a stream.
Reimplemented from XMLHandler.
|
inlineprotected |
write metaInfo to xml (usually in nameValue-tag)
|
protected |
map pointer for writing
|
protected |
Consumer class to work on spectra.
|
protected |
data processing auxiliary variable
|
protected |
map pointer for reading
|
protected |
Progress logging class.
|
protected |
|
protected |
Options for loading and storing.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
protected |
Consumer class to work on spectra.
|
protected |
Flag that indicates whether this spectrum should be skipped (due to options)
|
protected |
spectrum counter (spectra without peaks are not written)
|
protected |
Vector of spectrum data stored for later parallel processing.