| 3613 | } |
| 3614 | |
| 3615 | void MzMLHandler::writeSoftware_(std::ostream& os, const String& id, const Software& software, const Internal::MzMLValidator& validator) |
| 3616 | { |
| 3617 | os << "\t\t<software id=\"" << id << "\" version=\"" << software.getVersion() << "\" >\n"; |
| 3618 | ControlledVocabulary::CVTerm so_term = getChildWithName_("MS:1000531", software.getName()); |
| 3619 | if (so_term.id.empty()) |
| 3620 | { |
| 3621 | so_term = getChildWithName_("MS:1000531", software.getName() + " software"); //act of desperation to find the right cv and keep compatible with older cv mzmls |
| 3622 | } |
| 3623 | if (so_term.id.empty()) |
| 3624 | { |
| 3625 | so_term = getChildWithName_("MS:1000531", "TOPP " + software.getName()); //act of desperation to find the right cv and keep compatible with older cv mzmls |
| 3626 | } |
| 3627 | if (so_term.id == "MS:1000799") |
| 3628 | { |
| 3629 | os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000799\" name=\"custom unreleased software tool\" value=\"\" />\n"; |
| 3630 | } |
| 3631 | else if (!so_term.id.empty()) |
| 3632 | { |
| 3633 | os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"" << so_term.id << "\" name=\"" << writeXMLEscape(so_term.name) << "\" />\n"; |
| 3634 | } |
| 3635 | else |
| 3636 | { |
| 3637 | os << "\t\t\t<cvParam cvRef=\"MS\" accession=\"MS:1000799\" name=\"custom unreleased software tool\" value=\"" << writeXMLEscape(software.getName()) << "\" />\n"; |
| 3638 | } |
| 3639 | writeUserParam_(os, software, 3, "/mzML/Software/cvParam/@accession", validator); |
| 3640 | os << "\t\t</software>\n"; |
| 3641 | } |
| 3642 | |
| 3643 | void MzMLHandler::writeSourceFile_(std::ostream& os, const String& id, const SourceFile& source_file, const Internal::MzMLValidator& validator) |
| 3644 | { |
nothing calls this directly
no test coverage detected