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

Method writeCVList_

src/openms/source/FORMAT/HANDLERS/TraMLHandler.cpp:1720–1740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1718 }
1719
1720 void TraMLHandler::writeCVList_(std::ostream & os, const std::map<String, std::vector<CVTerm>> & cv_terms, UInt indent) const
1721 {
1722 for (std::map<String, std::vector<CVTerm> >::const_iterator it = cv_terms.begin();
1723 it != cv_terms.end(); ++it)
1724 {
1725 for (const CVTerm& cit : it->second)
1726 {
1727 os << String(2 * indent, ' ') << "<cvParam cvRef=\"" << cit.getCVIdentifierRef() << "\" accession=\"" << cit.getAccession() << "\" name=\"" << cit.getName() << "\"";
1728 if (cit.hasValue() && !cit.getValue().isEmpty() && !cit.getValue().toString().empty())
1729 {
1730 os << " value=\"" << cit.getValue().toString() << "\"";
1731 }
1732
1733 if (cit.hasUnit())
1734 {
1735 os << " unitCvRef=\"" << cit.getUnit().cv_ref << "\" unitAccession=\"" << cit.getUnit().accession << "\" unitName=\"" << cit.getUnit().name << "\"";
1736 }
1737 os << "/>" << "\n";
1738 }
1739 }
1740 }
1741} // namespace OpenMS //namespace Internal
1742

Callers

nothing calls this directly

Calls 12

getAccessionMethod · 0.80
hasValueMethod · 0.80
hasUnitMethod · 0.80
getUnitMethod · 0.80
StringClass · 0.50
beginMethod · 0.45
endMethod · 0.45
getNameMethod · 0.45
isEmptyMethod · 0.45
getValueMethod · 0.45
emptyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected