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

Method endElement

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

Source from the content-addressed store, hash-verified

328 }
329
330 void MzQuantMLHandler::endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname)
331 {
332 static set<String> to_ignore;
333 if (to_ignore.empty())
334 {
335 to_ignore.insert("Cv");
336 }
337
338 tag_ = sm_.convert(qname);
339
340 //determine parent tag
341 String parent_tag;
342 if (open_tags_.size() > 1)
343 {
344 parent_tag = *(open_tags_.end() - 2);
345 }
346 String parent_parent_tag;
347 if (open_tags_.size() > 2)
348 {
349 parent_parent_tag = *(open_tags_.end() - 3);
350 }
351
352 //close current tag
353 open_tags_.pop_back();
354
355 if (to_ignore.find(tag_) != to_ignore.end())
356 {
357 return;
358 }
359
360 // no ProcessingMethod endElement action so each userParam under
361 // Dataprocessing will be one processingaction - no other way for
362 // core-lib compatibility yet
363 if (tag_ == "DataProcessing")
364 {
365 current_dp_.second.setProcessingActions(current_pas_);
366 current_orderedps_.insert(current_dp_);
367 return;
368 }
369 else if (tag_ == "DataProcessingList")
370 {
371 std::vector<DataProcessing> dps;
372 for (std::map<int, DataProcessing>::const_iterator it = current_orderedps_.begin(); it != current_orderedps_.end(); ++it)
373 {
374 dps.push_back(it->second);
375 }
376 for (std::vector<DataProcessing>::iterator it = dps.begin(); it != dps.end(); ++it)
377 {
378 if (it->metaValueExists("software_ref") && current_sws_.find(it->getMetaValue("software_ref")) != current_sws_.end())
379 {
380 it->setSoftware(current_sws_[it->getMetaValue("software_ref")]);
381 }
382 }
383 msq_->setDataProcessingList(dps);
384 }
385 else if (tag_ == "Assay")
386 {
387 msq_->getAssays().push_back(current_assay_);

Callers

nothing calls this directly

Calls 15

setProcessingActionsMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
setDataProcessingListMethod · 0.80
addRatioMethod · 0.80
setUniqueIdMethod · 0.80
addConsensusMapMethod · 0.80
StringClass · 0.50
ConsensusMapClass · 0.50
emptyMethod · 0.45
insertMethod · 0.45
convertMethod · 0.45

Tested by

no test coverage detected