OpenMS
Loading...
Searching...
No Matches
CVMappingFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Andreas Bertsch $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
16#include <vector>
17
18namespace OpenMS
19{
20
31 class OPENMS_DLLAPI CVMappingFile :
32 protected Internal::XMLHandler,
34 {
35public:
36
39
41 ~CVMappingFile() override;
42
52 void load(const std::string& filename, CVMappings& cv_mappings, bool strip_namespaces = false);
53
54protected:
55
56 // Docu in base class
57 void onStartElement(const char16_t* qname, const Internal::XMLAttributes& attributes) override;
58
59 // Docu in base class
60 void onEndElement(const char16_t* qname) override;
61
62 // Docu in base class
63 void onCharacters(const char16_t* chars, Size /*length*/) override;
64
65private:
66
69
72
73 std::string tag_;
74
76
78
79 std::vector<CVMappingRule> rules_;
80
81 std::vector<CVReference> cv_references_;
82
83 };
84
85} // namespace OpenMS
86
Used to load CvMapping files.
Definition CVMappingFile.h:34
void load(const std::string &filename, CVMappings &cv_mappings, bool strip_namespaces=false)
loads CvMappings from the given file
void onCharacters(const char16_t *chars, Size) override
Parsing method for character data.
CVMappingFile & operator=(const CVMappingFile &rhs)
Not implemented.
~CVMappingFile() override
Destructor.
CVMappingFile(const CVMappingFile &rhs)
Not implemented.
CVMappingFile()
Default constructor.
std::vector< CVReference > cv_references_
Definition CVMappingFile.h:81
void onStartElement(const char16_t *qname, const Internal::XMLAttributes &attributes) override
Parsing method for opening tags.
std::string tag_
Definition CVMappingFile.h:73
std::vector< CVMappingRule > rules_
Definition CVMappingFile.h:79
bool strip_namespaces_
Definition CVMappingFile.h:75
CVMappingRule actual_rule_
Definition CVMappingFile.h:77
void onEndElement(const char16_t *qname) override
Parsing method for closing tags.
Representation of a CV Mapping rule used by CVMappings.
Definition CVMappingRule.h:28
Representation of controlled vocabulary mapping rules (for PSI formats)
Definition CVMappings.h:31
Xerces-free, lightweight view over the attribute list of an XML element.
Definition XMLAttributes.h:32
Base class for loading and storing XML files via Xerces, with optional schema validation and transpar...
Definition XMLFile.h:40
Base class for XML handlers.
Definition XMLHandler.h:42
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19