![]() |
OpenMS
|
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 (bool skip_xml_checks=false) | |
| void | domParseSpectrum (const std::string &in, OpenMS::Interfaces::SpectrumPtr &sptr) |
| Extract data from a string which contains a full mzML spectrum. More... | |
| void | domParseSpectrum (const std::string &in, MSSpectrum &s) |
| Extract data from a string which contains a full mzML spectrum. More... | |
| void | domParseChromatogram (const std::string &in, MSChromatogram &c) |
| Extract data from a string which contains a full mzML chromatogram. 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) const |
| decode binary data More... | |
| void | decodeBinaryDataMSSpectrum_ (std::vector< BinaryData > &data, OpenMS::MSSpectrum &s) const |
| void | decodeBinaryDataMSChrom_ (std::vector< BinaryData > &data, OpenMS::MSChromatogram &c) const |
| OpenMS::Interfaces::ChromatogramPtr | decodeBinaryDataChrom_ (std::vector< BinaryData > &data) const |
| decode binary data More... | |
| void | handleBinaryDataArray_ (xercesc::DOMNode *indexListNode, std::vector< BinaryData > &data) |
| Convert a single DOMNode of type binaryDataArray to BinaryData object. More... | |
| std::string | 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_ |
| Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead. More... | |
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 |
|
inlineexplicit |
|
protected |
decode binary data
|
protected |
|
protected |
|
protected |
decode binary data
| void domParseChromatogram | ( | const std::string & | in, |
| MSChromatogram & | c | ||
| ) |
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 |
| c | Resulting chromatogram |
| 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, |
| MSSpectrum & | s | ||
| ) |
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 |
| s | Resulting spectrum |
| 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.
| indexListNode | 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 |
Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead.