1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Nico Pfeifer $
25
// $Authors: Nico Pfeifer, Chris Bielow $
26
// --------------------------------------------------------------------------
28
#ifndef OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
29
#define OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
31
#include <OpenMS/FORMAT/HANDLERS/XMLHandler.h>
32
#include <OpenMS/CHEMISTRY/AASequence.h>
33
#include <OpenMS/METADATA/ProteinIdentification.h>
34
#include <OpenMS/METADATA/PeptideIdentification.h>
43
@brief Handler that is used for parsing MascotXML data
46
class OPENMS_DLLAPI MascotXMLHandler:
51
MascotXMLHandler(ProteinIdentification& protein_identification, std::vector<PeptideIdentification>& identifications, const String& filename, std::map<String, std::vector<AASequence> >& peptides);
54
virtual ~MascotXMLHandler();
57
virtual void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname);
60
virtual void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes);
63
virtual void characters(const XMLCh* const chars, const XMLSize_t /*length*/);
67
ProteinIdentification& protein_identification_; ///< the protein identifications
68
std::vector<PeptideIdentification>& id_data_; ///< the identifications (storing the peptide hits)
69
ProteinHit actual_protein_hit_;
70
PeptideHit actual_peptide_hit_;
71
UInt peptide_identification_index_;
74
String date_time_string_;
76
ProteinIdentification::SearchParameters search_parameters_;
79
std::map<String, std::vector<AASequence> >& modified_peptides_;
82
StringList tags_open_; ///< tracking the current XML tree
83
String major_version_;
84
String minor_version_;
87
} // namespace Internal
90
#endif // OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H