~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to include/OpenMS/FORMAT/HANDLERS/MascotXMLHandler.h

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2012-11-12 15:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20121112155812-vr15wtg9b50cuesg
Tags: upstream-1.9.0
ImportĀ upstreamĀ versionĀ 1.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: C++; tab-width: 2; -*-
 
2
// vi: set ts=2:
 
3
//
 
4
// --------------------------------------------------------------------------
 
5
//                   OpenMS Mass Spectrometry Framework
 
6
// --------------------------------------------------------------------------
 
7
//  Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
 
8
//
 
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.
 
13
// 
 
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.
 
18
//
 
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
 
22
//
 
23
// --------------------------------------------------------------------------
 
24
// $Maintainer: Nico Pfeifer $
 
25
// $Authors: Nico Pfeifer, Chris Bielow $
 
26
// --------------------------------------------------------------------------
 
27
 
 
28
#ifndef OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
 
29
#define OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H
 
30
 
 
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>
 
35
 
 
36
#include <vector>
 
37
 
 
38
namespace OpenMS
 
39
{
 
40
        namespace Internal
 
41
        {
 
42
  /**
 
43
    @brief Handler that is used for parsing MascotXML data
 
44
    
 
45
  */
 
46
  class OPENMS_DLLAPI MascotXMLHandler:
 
47
    public XMLHandler
 
48
  {
 
49
    public:
 
50
      /// Constructor
 
51
      MascotXMLHandler(ProteinIdentification& protein_identification, std::vector<PeptideIdentification>& identifications, const String& filename, std::map<String, std::vector<AASequence> >& peptides);
 
52
 
 
53
      /// Destructor
 
54
      virtual ~MascotXMLHandler();
 
55
      
 
56
                        // Docu in base class
 
57
      virtual void endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname);
 
58
                        
 
59
                        // Docu in base class
 
60
      virtual void startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const xercesc::Attributes& attributes);
 
61
                        
 
62
                        // Docu in base class
 
63
      virtual void characters(const XMLCh* const chars, const XMLSize_t /*length*/);
 
64
                  
 
65
    private:
 
66
        
 
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_;
 
72
                        String tag_;
 
73
                        DateTime date_;
 
74
                        String date_time_string_;
 
75
                        UInt actual_query_;
 
76
                        ProteinIdentification::SearchParameters search_parameters_;
 
77
                        String identifier_;
 
78
                        String actual_title_;
 
79
                        std::map<String, std::vector<AASequence> >& modified_peptides_;
 
80
      String warning_msg_;
 
81
 
 
82
                        StringList tags_open_; ///< tracking the current XML tree
 
83
                        String major_version_;
 
84
                        String minor_version_;
 
85
  };
 
86
 
 
87
        } // namespace Internal
 
88
} // namespace OpenMS
 
89
 
 
90
#endif // OPENMS_FORMAT_HANDLERS_MASCOTXMLHANDLER_H