| 79 | } |
| 80 | |
| 81 | void ConsensusXMLFile::load(const String& filename, ConsensusMap& consensus_map) |
| 82 | { |
| 83 | consensus_map.clear(true); // clear map |
| 84 | |
| 85 | //set DocumentIdentifier |
| 86 | consensus_map.setLoadedFileType(filename); |
| 87 | consensus_map.setLoadedFilePath(filename); |
| 88 | |
| 89 | Internal::ConsensusXMLHandler handler(consensus_map, filename); |
| 90 | handler.setOptions(options_); |
| 91 | handler.setLogType(getLogType()); |
| 92 | parse_(filename, &handler); |
| 93 | |
| 94 | if (!consensus_map.isMapConsistent(&OpenMS_Log_warn)) // a warning is printed to LOG_WARN during isMapConsistent() |
| 95 | { |
| 96 | // don't throw exception for now, since this would prevent us from reading old files... |
| 97 | // throw Exception::MissingInformation(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "The ConsensusXML file contains invalid maps or references thereof. Please fix the file!"); |
| 98 | |
| 99 | } |
| 100 | |
| 101 | } |
| 102 | |
| 103 | } // namespace OpenMS |
no test coverage detected