Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_crosslinking_configfile.hpp
1/*
2##############################################################################
3# file: ms_crosslinking_configfile.hpp #
4# 'msparser' toolkit #
5# Represents crosslinking.xml file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2019 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Author: villek@matrixscience.com $ #
12# $Date: 2018-12-20 12:05:22 +0000 $ #
13# $Revision: 9de60354aaae13272cadfa764dbabd92c93c724c | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
14##############################################################################
15*/
16
17#ifndef MS_CROSSLINKING_CONFIGFILE_HPP
18#define MS_CROSSLINKING_CONFIGFILE_HPP
19
20
21#include <string>
22#include <vector>
23
24
25namespace matrix_science {
26 class ms_crosslinking_method; // forward declaration
27
34
48 class MS_MASCOTRESFILE_API ms_crosslinking_configfile: public ms_errors
49 {
50 public:
53
55 ms_crosslinking_configfile(const char* fileName, const char* schemaFileName,
56 const ms_connection_settings * cs = 0, bool useSchema = true);
57
60
63
64#ifndef SWIG
67#endif
69 void copyFrom(const ms_crosslinking_configfile* right);
70
72 virtual void defaultValues();
73
75 std::string getFileName() const;
76
78 void setFileName(const char* filename);
79
81 void setSchemaFileName(const char* name);
82
84 std::string getSchemaFileName() const;
85
87 static std::string getDefaultSchemaFileName();
88
90 void setConnectionSettings(const ms_connection_settings & cs);
91
93 ms_connection_settings getConnectionSettings() const;
94
96 void read_file();
97
99 void save_file();
100
102 void read_buffer(const char* buffer);
103
105 std::string save_buffer(bool validateAgainstSchema = true);
106
108 std::string validateDocument() const;
109
111 std::string getMajorVersion() const;
112
114 std::string getMinorVersion() const;
115
116
118 int getNumberOfMethods() const;
119
121 void clearMethods();
122
124 void appendMethod(const ms_crosslinking_method *elem);
125
127 const ms_crosslinking_method * getMethodByNumber(const int idx) const;
128
130 const ms_crosslinking_method * getMethodByName(const char *name) const;
131
133 bool updateMethodByNumber(const int idx, const ms_crosslinking_method* method);
134
136 bool updateMethodByName(const char *name, const ms_crosslinking_method* method);
137
139 bool deleteMethodByNumber(const int idx);
140
142 bool deleteMethodByName(const char *name);
143
144
145 private:
146 std::string m_fileName;
147 std::string m_schemaFileName;
149
150 std::string m_majorVersion;
151 std::string m_minorVersion;
152
153 std::string m_encodingName;
154 bool m_useSchema;
155
156 typedef std::vector< ms_crosslinking_method* > method_vector;
157 method_vector m_methods;
158
159 }; // class ms_crosslinking_configfile
160 // end of config_group
162
163} // namespace matrix_science
164
165#endif // MS_CROSSLINKING_CONFIGFILE_HPP
166/*------------------------------- End of File -------------------------------*/
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
This class represents the file crosslinking.xml.
Definition: ms_crosslinking_configfile.hpp:49
Represents a method object in crosslinking.xml
Definition: ms_crosslinking_method.hpp:50
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696