| 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); |
nothing calls this directly
no test coverage detected