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

MzXMLHandler< MapType > Class Template Reference

XML handlers for MzXMLFile. More...

#include <OpenMS/FORMAT/HANDLERS/MzXMLHandler.h>

Inheritance diagram for MzXMLHandler< MapType >:
XMLHandler DefaultHandler

List of all members.

Public Member Functions

virtual void endElement (const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname)
 Parsing method for closing tags.
virtual void startElement (const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname, const xercesc::Attributes &attributes)
 Parsing method for opening tags.
virtual void characters (const XMLCh *const chars, const XMLSize_t length)
 Parsing method for character data.
void writeTo (std::ostream &os)
 Write the contents to a stream.
void setOptions (const PeakFileOptions &options)
 Sets the options.
Constructors and destructor

 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.
virtual ~MzXMLHandler ()
 Destructor.

Protected Types

typedef MapType::PeakType PeakType
 Peak type.
typedef MSSpectrum< PeakTypeSpectrumType
 Spectrum type.
typedef SpectrumType::Iterator PeakIterator

Protected Member Functions

void writeUserParam_ (std::ostream &os, const MetaInfoInterface &meta, int indent=4, String tag="nameValue")
 write metaInfo to xml (usually in nameValue-tag)

Protected Attributes

MapType * exp_
 map pointer for reading
const MapType * cexp_
 map pointer for writing
PeakFileOptions options_
 Options for loading and storing.
bool skip_spectrum_
 Flag that indicates whether this spectrum should be skipped (due to options).
UInt spec_write_counter_
 spectrum counter (spectra without peaks are not written)
const ProgressLoggerlogger_
 Progress logging class.
std::vector< DataProcessingdata_processing_
 data processing auxilary variable
temporary data structures to hold parsed data

Base64 decoder_
UInt peak_count_
String precision_
String compressionType_
String char_rest_

Private Member Functions

void init_ ()
 MzXMLHandler ()
 Not implemented.
void initStaticMembers_ ()

Static Private Attributes

static const XMLCh * s_value_ = 0
static const XMLCh * s_count_ = 0
static const XMLCh * s_type_ = 0
static const XMLCh * s_name_ = 0
static const XMLCh * s_version_ = 0
static const XMLCh * s_filename_ = 0
static const XMLCh * s_filetype_ = 0
static const XMLCh * s_filesha1_ = 0
static const XMLCh * s_completiontime_ = 0
static const XMLCh * s_precision_ = 0
static const XMLCh * s_byteorder_ = 0
static const XMLCh * s_pairorder_ = 0
static const XMLCh * s_compressionType_ = 0
static const XMLCh * s_precursorintensity_ = 0
static const XMLCh * s_precursorcharge_ = 0
static const XMLCh * s_windowwideness_ = 0
static const XMLCh * s_mslevel_ = 0
static const XMLCh * s_peakscount_ = 0
static const XMLCh * s_polarity_ = 0
static const XMLCh * s_scantype_ = 0
static const XMLCh * s_retentiontime_ = 0
static const XMLCh * s_startmz_ = 0
static const XMLCh * s_endmz_ = 0
static const XMLCh * s_first_ = 0
static const XMLCh * s_last_ = 0
static const XMLCh * s_phone_ = 0
static const XMLCh * s_email_ = 0
static const XMLCh * s_uri_ = 0
static const XMLCh * s_num_ = 0
static const XMLCh * s_intensitycutoff_ = 0
static const XMLCh * s_centroided_ = 0
static const XMLCh * s_deisotoped_ = 0
static const XMLCh * s_chargedeconvoluted_ = 0

Detailed Description

template<typename MapType>
class OpenMS::Internal::MzXMLHandler< MapType >

XML handlers for MzXMLFile.

MapType has to be a MSExperiment or have the same interface. Do not use this class. It is only needed in MzXMLFile.


Member Typedef Documentation

typedef SpectrumType::Iterator PeakIterator [protected]
typedef MapType::PeakType PeakType [protected]

Peak type.

typedef MSSpectrum<PeakType> SpectrumType [protected]

Spectrum type.


Constructor & Destructor Documentation

MzXMLHandler ( MapType &  exp,
const String filename,
const String version,
ProgressLogger logger 
) [inline]

Constructor for a read-only handler.

References MzXMLHandler< MapType >::init_().

MzXMLHandler ( const MapType &  exp,
const String filename,
const String version,
const ProgressLogger logger 
) [inline]

Constructor for a write-only handler.

References MzXMLHandler< MapType >::init_().

virtual ~MzXMLHandler (  )  [inline, virtual]

Destructor.

MzXMLHandler (  )  [private]

Not implemented.


Member Function Documentation

void characters ( const XMLCh *const   chars,
const XMLSize_t  length 
) [virtual]
void setOptions ( const PeakFileOptions options  )  [inline]

Sets the options.

References MzXMLHandler< MapType >::options_.

Referenced by MzXMLFile::load().

void startElement ( const XMLCh *const   uri,
const XMLCh *const   localname,
const XMLCh *const   qname,
const xercesc::Attributes &  attrs 
) [virtual]

Parsing method for opening tags.

Reimplemented from XMLHandler.

References XMLHandler::asDateTime_(), XMLHandler::asDouble_(), XMLHandler::attributeAsDouble_(), XMLHandler::attributeAsInt_(), XMLHandler::attributeAsString_(), ScanWindow::begin, DataProcessing::CHARGE_DECONVOLUTION, MzXMLHandler< MapType >::compressionType_, PeakFileOptions::containsMSLevel(), StringManager::convert(), InstrumentSettings::CRM, XMLHandler::cvStringToEnum_(), MzXMLHandler< MapType >::data_processing_, DataProcessing::DEISOTOPING, DRange< D >::encloses(), ScanWindow::end, XMLHandler::error(), MzXMLHandler< MapType >::exp_, PeakFileOptions::getMetadataOnly(), PeakFileOptions::getRTRange(), String::has(), PeakFileOptions::hasMSLevels(), PeakFileOptions::hasRTRange(), MzXMLHandler< MapType >::initStaticMembers_(), XMLHandler::LOAD, MzXMLHandler< MapType >::logger_, InstrumentSettings::MASSSPECTRUM, InstrumentSettings::MSNSPECTRUM, XMLHandler::open_tags_, XMLHandler::optionalAttributeAsDouble_(), XMLHandler::optionalAttributeAsInt_(), XMLHandler::optionalAttributeAsString_(), MzXMLHandler< MapType >::options_, MzXMLHandler< MapType >::peak_count_, DataProcessing::PEAK_PICKING, MzXMLHandler< MapType >::precision_, String::prefix(), MzXMLHandler< MapType >::s_byteorder_, MzXMLHandler< MapType >::s_centroided_, MzXMLHandler< MapType >::s_chargedeconvoluted_, MzXMLHandler< MapType >::s_completiontime_, MzXMLHandler< MapType >::s_compressionType_, MzXMLHandler< MapType >::s_count_, MzXMLHandler< MapType >::s_deisotoped_, MzXMLHandler< MapType >::s_email_, MzXMLHandler< MapType >::s_endmz_, MzXMLHandler< MapType >::s_filename_, MzXMLHandler< MapType >::s_filesha1_, MzXMLHandler< MapType >::s_filetype_, MzXMLHandler< MapType >::s_first_, MzXMLHandler< MapType >::s_intensitycutoff_, MzXMLHandler< MapType >::s_last_, MzXMLHandler< MapType >::s_mslevel_, MzXMLHandler< MapType >::s_name_, MzXMLHandler< MapType >::s_num_, MzXMLHandler< MapType >::s_pairorder_, MzXMLHandler< MapType >::s_peakscount_, MzXMLHandler< MapType >::s_phone_, MzXMLHandler< MapType >::s_polarity_, MzXMLHandler< MapType >::s_precision_, MzXMLHandler< MapType >::s_precursorcharge_, MzXMLHandler< MapType >::s_precursorintensity_, MzXMLHandler< MapType >::s_retentiontime_, MzXMLHandler< MapType >::s_scantype_, MzXMLHandler< MapType >::s_startmz_, MzXMLHandler< MapType >::s_type_, MzXMLHandler< MapType >::s_uri_, MzXMLHandler< MapType >::s_value_, MzXMLHandler< MapType >::s_version_, MzXMLHandler< MapType >::s_windowwideness_, SourceFile::setChecksum(), SourceFile::setFileType(), SourceFile::setNameOfFile(), ProgressLogger::setProgress(), SourceFile::SHA1, InstrumentSettings::SIM, MzXMLHandler< MapType >::skip_spectrum_, XMLHandler::sm_, InstrumentSettings::SRM, ProgressLogger::startProgress(), String::suffix(), and XMLHandler::warning().

void writeTo ( std::ostream &  os  )  [virtual]

Write the contents to a stream.

Reimplemented from XMLHandler.

References Base64::BYTEORDER_BIGENDIAN, MzXMLHandler< MapType >::cexp_, DataProcessing::CHARGE_DECONVOLUTION, InstrumentSettings::CRM, XMLHandler::cv_terms_, MzXMLHandler< MapType >::decoder_, DataProcessing::DEISOTOPING, Base64::encode(), ProgressLogger::endProgress(), DateTime::get(), Precursor::getCharge(), SourceFile::getChecksum(), SourceFile::getChecksumType(), SpectrumSettings::getComment(), DataProcessing::getCompletionTime(), ContactPerson::getEmail(), SourceFile::getFileType(), ContactPerson::getFirstName(), SpectrumSettings::getInstrumentSettings(), Peak1D::getIntensity(), Instrument::getIonDetectors(), Instrument::getIonSources(), Precursor::getIsolationWindowLowerOffset(), Precursor::getIsolationWindowUpperOffset(), ContactPerson::getLastName(), Instrument::getMassAnalyzers(), MetaInfoInterface::getMetaValue(), Instrument::getModel(), MSSpectrum< PeakT >::getMSLevel(), Peak1D::getMZ(), Software::getName(), SourceFile::getNameOfFile(), SpectrumSettings::getNativeID(), InstrumentSettings::getPolarity(), SpectrumSettings::getPrecursors(), DataProcessing::getProcessingActions(), MSSpectrum< PeakT >::getRT(), InstrumentSettings::getScanMode(), InstrumentSettings::getScanWindows(), DataProcessing::getSoftware(), Instrument::getSoftware(), ContactPerson::getURL(), Instrument::getVendor(), Software::getVersion(), InstrumentSettings::getZoomScan(), String::hasPrefix(), String::hasSubstring(), MzXMLHandler< MapType >::logger_, InstrumentSettings::MASSSPECTRUM, MetaInfoInterface::metaValueExists(), InstrumentSettings::MS1SPECTRUM, InstrumentSettings::MSNSPECTRUM, InstrumentSettings::NamesOfScanMode, DataProcessing::PEAK_PICKING, ProgressLogger::setProgress(), InstrumentSettings::SIM, MzXMLHandler< MapType >::spec_write_counter_, InstrumentSettings::SRM, ProgressLogger::startProgress(), XMLHandler::STORE, String::substr(), String::toInt(), String::toLower(), DataValue::toString(), InstrumentSettings::UNKNOWN, XMLHandler::warning(), and MzXMLHandler< MapType >::writeUserParam_().

void writeUserParam_ ( std::ostream &  os,
const MetaInfoInterface meta,
int  indent = 4,
String  tag = "nameValue" 
) [inline, protected]

write metaInfo to xml (usually in nameValue-tag)

References MetaInfoInterface::getKeys(), and MetaInfoInterface::getMetaValue().

Referenced by MzXMLHandler< MapType >::writeTo().


Member Data Documentation

const MapType* cexp_ [protected]

map pointer for writing

Referenced by MzXMLHandler< MapType >::writeTo().

std::vector<DataProcessing> data_processing_ [protected]

data processing auxilary variable

Referenced by MzXMLHandler< MapType >::startElement().

const XMLCh * s_num_ = 0 [static, private]
const XMLCh * s_uri_ = 0 [static, private]
bool skip_spectrum_ [protected]

Flag that indicates whether this spectrum should be skipped (due to options).

Referenced by MzXMLHandler< MapType >::characters(), MzXMLHandler< MapType >::endElement(), and MzXMLHandler< MapType >::startElement().

spectrum counter (spectra without peaks are not written)

Referenced by MzXMLHandler< MapType >::writeTo().


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