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