A class to decode input strings that contain an mzML chromatogram or spectrum tag. More...
#include <OpenMS/FORMAT/HANDLERS/MzMLSpectrumDecoder.h>
Public Member Functions | |
MzMLSpectrumDecoder () | |
void | domParseSpectrum (const std::string &in, OpenMS::Interfaces::SpectrumPtr &sptr) |
Extract data from a string which contains a full mzML spectrum. More... | |
void | domParseChromatogram (const std::string &in, OpenMS::Interfaces::ChromatogramPtr &cptr) |
Extract data from a string which contains a full mzML chromatogram. More... | |
void | setSkipXMLChecks (bool only) |
Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead. More... | |
Protected Types | |
typedef Internal::MzMLHandlerHelper::BinaryData | BinaryData |
Protected Member Functions | |
OpenMS::Interfaces::SpectrumPtr | decodeBinaryDataSpectrum_ (std::vector< BinaryData > &data_) |
decode binary data More... | |
OpenMS::Interfaces::ChromatogramPtr | decodeBinaryDataChrom_ (std::vector< BinaryData > &data_) |
decode binary data More... | |
void | handleBinaryDataArray_ (xercesc::DOMNode *indexListNode, std::vector< BinaryData > &data_) |
Convert a single DOMNode of type binaryDataArray to BinaryData object. More... | |
void | domParseString_ (const std::string &in, std::vector< BinaryData > &data_) |
Extract data from a string containing multiple <binaryDataArray> tags. More... | |
Protected Attributes | |
bool | skip_xml_checks_ |
A class to decode input strings that contain an mzML chromatogram or spectrum tag.
It uses xercesc to parse a string containing either a exactly one mzML spectrum or chromatogram (from <chromatogram> to </chromatogram> or <spectrum> to </spectrum> tag). It returns the data contained in the binaryDataArray for Intensity / mass-to-charge or Intensity / time.
|
protected |
|
inline |
|
protected |
decode binary data
Duplicated code from MzMLHandler, need to clean up see void MzMLHandler<MapType>::fillData_()
|
protected |
decode binary data
Duplicated code from MzMLHandler, need to clean up see void MzMLHandler<MapType>::fillData_()
void domParseChromatogram | ( | const std::string & | in, |
OpenMS::Interfaces::ChromatogramPtr & | cptr | ||
) |
Extract data from a string which contains a full mzML chromatogram.
Extracts data from the input string which is expected to contain exactly one <chromatogram> tag (from <chromatogram> to </chromatogram>). This function will extract the contained binaryDataArray and provide the result as Chromatogram.
in | Input string containing the raw XML |
cptr | Resulting chromatogram |
void domParseSpectrum | ( | const std::string & | in, |
OpenMS::Interfaces::SpectrumPtr & | sptr | ||
) |
Extract data from a string which contains a full mzML spectrum.
Extracts data from the input string which is expected to contain exactly one <spectrum> tag (from <spectrum> to </spectrum>). This function will extract the contained binaryDataArray and provide the result as Spectrum.
in | Input string containing the raw XML |
sptr | Resulting spectrum |
|
protected |
Extract data from a string containing multiple <binaryDataArray> tags.
This may be a string from <spectrum> to </spectrum> or <chromatogram> to </chromatogram> tag which contains one or more <binaryDataArray>. These XML tags need to conform to the mzML standard. The function will return a vector with all binary data found in the string in the binaryDataArray tags.
in | Input string containing the raw XML |
data_ | Binary data extracted from the string |
|
protected |
Convert a single DOMNode of type binaryDataArray to BinaryData object.
This function will extract the data from a xerces DOMNode which points to a binaryDataArray tag and store the result as a BinaryData object. The result will be appended to the data_ vector.
in | DOMNode of type binaryDataArray |
data_ | Binary data extracted from the string |
void setSkipXMLChecks | ( | bool | only | ) |
Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead.
|
protected |
OpenMS / TOPP release 2.3.0 | Documentation generated on Tue Jan 9 2018 18:22:11 using doxygen 1.8.13 |