| 942 | } |
| 943 | |
| 944 | void MzIdentMLHandler::writeMetaInfos_(String& s, const MetaInfoInterface& meta, UInt indent) const |
| 945 | { |
| 946 | //TODO @mths: write those metas with their name in the cvs loaded as CVs! |
| 947 | if (meta.isMetaEmpty()) |
| 948 | { |
| 949 | return; |
| 950 | } |
| 951 | std::vector<String> keys; |
| 952 | meta.getKeys(keys); |
| 953 | |
| 954 | for (Size i = 0; i != keys.size(); ++i) |
| 955 | { |
| 956 | if (cv_.exists(keys[i])) |
| 957 | { |
| 958 | ControlledVocabulary::CVTerm a = cv_.getTerm(keys[i]); |
| 959 | s += String(indent, '\t') + a.toXMLString("PSI-MS", (String)(meta.getMetaValue(keys[i]))) + "\n"; |
| 960 | } |
| 961 | else |
| 962 | { |
| 963 | s += String(indent, '\t') + "<userParam name=\"" + keys[i] + "\" unitName=\""; |
| 964 | |
| 965 | const DataValue& d = meta.getMetaValue(keys[i]); |
| 966 | //determine type |
| 967 | if (d.valueType() == DataValue::INT_VALUE) |
| 968 | { |
| 969 | s += "xsd:integer"; |
| 970 | } |
| 971 | else if (d.valueType() == DataValue::DOUBLE_VALUE) |
| 972 | { |
| 973 | s += "xsd:double"; |
| 974 | } |
| 975 | else //string or lists are converted to string |
| 976 | { |
| 977 | s += "xsd:string"; |
| 978 | } |
| 979 | s += "\" value=\"" + (String)(d) + "\"/>\n"; |
| 980 | } |
| 981 | } |
| 982 | } |
| 983 | |
| 984 | void MzIdentMLHandler::writeEnzyme_(String& s, const DigestionEnzymeProtein& enzy, UInt miss, UInt indent) const |
| 985 | { |
nothing calls this directly
no test coverage detected