Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef OPENMS_FORMAT_OMSSAXMLFILE_H
00036 #define OPENMS_FORMAT_OMSSAXMLFILE_H
00037
00038 #include <OpenMS/FORMAT/HANDLERS/XMLHandler.h>
00039 #include <OpenMS/FORMAT/XMLFile.h>
00040 #include <OpenMS/METADATA/ProteinIdentification.h>
00041 #include <OpenMS/METADATA/PeptideIdentification.h>
00042 #include <OpenMS/DATASTRUCTURES/Map.h>
00043 #include <OpenMS/CHEMISTRY/ResidueModification.h>
00044 #include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
00045
00046 #include <vector>
00047
00048 namespace OpenMS
00049 {
00050 class String;
00051 class ModificationsDB;
00052
00061 class OPENMS_DLLAPI OMSSAXMLFile :
00062 protected Internal::XMLHandler,
00063 public Internal::XMLFile
00064 {
00065 public:
00066
00068 OMSSAXMLFile();
00069
00071 virtual ~OMSSAXMLFile();
00088 void load(const String & filename, ProteinIdentification & protein_identification, std::vector<PeptideIdentification> & id_data, bool load_proteins = true);
00089
00091 void setModificationDefinitionsSet(const ModificationDefinitionsSet & rhs);
00092
00093 protected:
00094
00095 void endElement(const XMLCh * const , const XMLCh * const , const XMLCh * const qname);
00096
00097
00098 void startElement(const XMLCh * const , const XMLCh * const , const XMLCh * const qname, const xercesc::Attributes & attributes);
00099
00100
00101 void characters(const XMLCh * const chars, const XMLSize_t );
00102
00103 private:
00104
00105 OMSSAXMLFile(const OMSSAXMLFile & rhs);
00106
00107 OMSSAXMLFile & operator=(const OMSSAXMLFile & rhs);
00108
00110 void readMappingFile_();
00111
00113 std::vector<PeptideIdentification> * peptide_identifications_;
00114
00115 ProteinHit actual_protein_hit_;
00116
00117 PeptideHit actual_peptide_hit_;
00118
00119 PeptideIdentification actual_peptide_id_;
00120
00121 ProteinIdentification actual_protein_id_;
00122
00123 String tag_;
00124
00126 UInt actual_mod_site_;
00127
00129 String actual_mod_type_;
00130
00132 std::vector<std::pair<UInt, String> > modifications_;
00133
00135 bool load_proteins_;
00136
00138 Map<UInt, std::vector<ResidueModification> > mods_map_;
00139
00141 Map<String, UInt> mods_to_num_;
00142
00144 ModificationDefinitionsSet mod_def_set_;
00145 };
00146
00147 }
00148
00149 #endif // OPENMS_FORMAT_OMSSAXMLFILE_H