virtual std::string identify(const std::string& filename, const std::string& head) const { std::string result; try { string rootElement = GetXMLRootElement(head); result = (rootElement == "mzXML" || rootElement == "msRun")?getType():""; } catch (runtime_error&) { } return result; }
Type type(istream& is) const { try { string rootElement = GetXMLRootElement(is); if (rootElement == "TraML") return Type_traML; } catch (runtime_error&) { } return Type_Unknown; }
virtual std::string identify(const string& filename, const string& head) const { std::string result; try { // TODO: congratulate Bruker for their unique root element name string rootElement = GetXMLRootElement(head); result = (rootElement == "root")?getType():""; } catch (runtime_error&) { } return result; }
Type type(istream& is) const { try { string rootElement = GetXMLRootElement(is); if (rootElement == "indexedmzML") return Type_mzML_Indexed; if (rootElement == "mzML") return Type_mzML; } catch (runtime_error&) { } return Type_Unknown; }