MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / startElement

Method startElement

src/openms/source/FORMAT/HANDLERS/MzQuantMLHandler.cpp:44–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 = default;
43
44 void MzQuantMLHandler::startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes)
45 {
46 tag_ = sm_.convert(qname);
47 open_tags_.push_back(tag_);
48
49 static set<String> to_ignore;
50 if (to_ignore.empty())
51 {
52 to_ignore.insert("CvList"); // for now static set of obos.
53 to_ignore.insert("Cv"); // for now static set of obos.
54 to_ignore.insert("ProteinGroupList"); // for now no proteins or groups
55 to_ignore.insert("ProteinList"); // .
56 to_ignore.insert("Protein"); // .
57 to_ignore.insert("StudyVariableList"); // We can't deal with these right now, but that is coming
58 to_ignore.insert("StudyVariable"); // .
59 to_ignore.insert("Assay_refs"); // .
60
61 to_ignore.insert("FeatureList"); // we only need to see the features and data matrices rows
62 to_ignore.insert("AssayList"); // we only need to see the assays
63 to_ignore.insert("DataProcessingList"); // we only need to see the DataProcessings
64 to_ignore.insert("SoftwareList"); // we only need to see the Softwares
65 to_ignore.insert("InputFiles"); // we only need to see the Files
66 to_ignore.insert("Label"); // we only need to see the Modifications
67 to_ignore.insert("DataType"); // we only need to see the Modifications
68 to_ignore.insert("ColumnIndex"); // we only need to see the inside characters
69 to_ignore.insert("DataMatrix"); // we only need to see the inside characters
70 }
71
72 if (to_ignore.find(tag_) != to_ignore.end())
73 {
74 return;
75 }
76
77 //determine parent tag
78 String parent_tag;
79 if (open_tags_.size() > 1)
80 {
81 parent_tag = *(open_tags_.end() - 2);
82 }
83 String parent_parent_tag;
84 if (open_tags_.size() > 2)
85 {
86 parent_parent_tag = *(open_tags_.end() - 3);
87 }
88
89 static const XMLCh* s_type = xercesc::XMLString::transcode("type");
90 static const XMLCh* s_value = xercesc::XMLString::transcode("value");
91 static const XMLCh* s_name = xercesc::XMLString::transcode("name");
92
93 if (tag_ == "cvParam")
94 {
95 static const XMLCh* s_unit_accession = xercesc::XMLString::transcode("unitAccession");
96 static const XMLCh* s_cv_ref = xercesc::XMLString::transcode("cvRef");
97 static const XMLCh* s_accession = xercesc::XMLString::transcode("accession");
98
99 String value, unit_accession, cv_ref;
100 optionalAttributeAsString_(value, attributes, s_value);
101 optionalAttributeAsString_(unit_accession, attributes, s_unit_accession);

Callers

nothing calls this directly

Calls 15

attributeAsString_Function · 0.85
asInt_Function · 0.85
AssayClass · 0.85
attributeAsInt_Function · 0.85
attributeAsDouble_Function · 0.85
optionalAttributeAsInt_Function · 0.85
setVersionMethod · 0.80
setLoadedFilePathMethod · 0.80
substrMethod · 0.80
emplace_backMethod · 0.80
toDoubleMethod · 0.80

Tested by

no test coverage detected