Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_modification.hpp
1/*
2##############################################################################
3# file: ms_umod_modification.hpp #
4# 'msparser' toolkit #
5# Represents modification object in unimod.xml file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2006 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_umod_modification.hpp $
12 * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
13 * @(#)$Date: 2018-07-30 16:23:53 +0100 $
14##############################################################################
15 */
16
17#ifndef MS_UMOD_MODIFICATION_HPP
18#define MS_UMOD_MODIFICATION_HPP
19
20
21#include <string>
22#include <vector>
23
24// forward declarations
25namespace msparser_internal {
26 class ms_umod_xmlloader;
27}
28
29namespace matrix_science {
30
31 class ms_umod_composition; // forward declaration
32 class ms_umod_specificity; // forward declaration
33 class ms_umod_xref; // forward declaration
34 class ms_quant_localdef; // forward declaration
35 class ms_quant_unmodified; // forward declaration
36 class ms_umod_configfile; // forward declaration
37 class ms_quant_component; // forward declaration
38 class ms_xml_schema; // forward declaration
39
46 class MS_MASCOTRESFILE_API ms_umod_modification: public ms_xml_IValidatable
47 {
48 friend class msparser_internal::ms_umod_xmlloader;
49 friend class ms_umod_configfile;
50
51 public:
54
57
60
63
65 void updateMasses(const ms_umod_configfile& umodFile, const ms_quant_component& quantComp);
66
68 virtual ~ms_umod_modification();
69
71 void defaultValues();
72
74 void copyFrom(const ms_umod_modification* right);
75
77 void copyFrom(const ms_quant_localdef* right, const ms_umod_configfile& umodFile);
78
80 void copyFrom(const ms_quant_unmodified* right);
81
82#ifndef SWIG
84 ms_umod_modification& operator=(const ms_umod_modification& right);
85#endif
86
88 bool isSameAs(const ms_umod_modification& right_mod) const;
89
91 virtual std::string getSchemaType() const;
92
94 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
95
97 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
98
99
101 std::vector< std::string > getModFileList(const unsigned int flags = ms_umod_configfile::MODFILE_FLAGS_ALL) const;
102
104 int findSpecGroup(const char* modFileName) const;
105
107 int getNumberOfSpecificities() const;
108
110 void clearSpecificities();
111
113 void appendSpecificity(const ms_umod_specificity *specificity);
114
116 const ms_umod_specificity * getSpecificity(const int idx) const;
117
119 const ms_umod_specificity * getSpecificityBySite(const char *site) const;
120
122 const ms_umod_specificity * getSpecificityBySiteAndPosition(const char *site, const char *position) const;
123
125 bool updateSpecificity(const int idx, const ms_umod_specificity *specificity);
126
128 bool deleteSpecificity(const int idx);
129
131 std::string getSpecificitySchemaType() const;
132
133
135 bool haveDelta() const;
136
138 const ms_umod_composition* getDelta() const;
139
141 void setDelta(const ms_umod_composition* delta);
142
144 void dropDelta();
145
147 std::string getDeltaSchemaType() const;
148
149
151 int getNumberOfIgnores() const;
152
154 void clearIgnores();
155
157 void appendIgnore(const ms_umod_composition *ignore);
158
160 const ms_umod_composition * getIgnore(const int idx) const;
161
163 bool updateIgnore(const int idx, const ms_umod_composition *ignore);
164
166 bool deleteIgnore(const int idx);
167
169 std::string getIgnoreSchemaType() const;
170
171
173 int getNumberOfAltNames() const;
174
176 void clearAltNames();
177
179 void appendAltName(const char *alt_name);
180
182 std::string getAltName(const int idx) const;
183
185 bool updateAltName(const int idx, const char *alt_name);
186
188 bool deleteAltName(const int idx);
189
191 std::string getAltNameSchemaType() const;
192
193
195 int getNumberOfXrefs() const;
196
198 void clearXrefs();
199
201 void appendXref(const ms_umod_xref *xref);
202
204 const ms_umod_xref* getXref(const int idx) const;
205
207 bool updateXref(const int idx, const ms_umod_xref *xref);
208
210 bool deleteXref(const int idx);
211
213 std::string getXrefSchemaType() const;
214
215
217 bool haveMiscNotes() const;
218
220 std::string getMiscNotes() const;
221
223 void setMiscNotes(const char* value);
224
226 void dropMiscNotes();
227
229 std::string getMiscNotesSchemaType() const;
230
231
233 bool haveTitle() const;
234
236 std::string getTitle() const;
237
239 void setTitle(const char* value);
240
242 void dropTitle();
243
245 std::string getTitleSchemaType() const;
246
247
249 bool haveFullName() const;
250
252 std::string getFullName() const;
253
255 void setFullName(const char* value);
256
258 void dropFullName();
259
261 std::string getFullNameSchemaType() const;
262
263
265 bool haveApproved() const;
266
268 bool isApproved() const;
269
271 void setApproved(const bool value);
272
274 void dropApproved();
275
277 std::string getApprovedSchemaType() const;
278
279
281 bool haveUsernameOfPoster() const;
282
284 std::string getUsernameOfPoster() const;
285
287 void setUsernameOfPoster(const char* value);
288
290 void dropUsernameOfPoster();
291
293 std::string getUsernameOfPosterSchemaType() const;
294
295
297 bool haveGroupOfPoster() const;
298
300 std::string getGroupOfPoster() const;
301
303 void setGroupOfPoster(const char* value);
304
306 void dropGroupOfPoster();
307
309 std::string getGroupOfPosterSchemaType() const;
310
311
313 bool haveDateTimePosted() const;
314
316 std::string getDateTimePosted() const;
317
319 void setDateTimePosted(const char* value);
320
322 void dropDateTimePosted();
323
325 std::string getDateTimePostedSchemaType() const;
326
327
329 bool haveDateTimeModified() const;
330
332 std::string getDateTimeModified() const;
333
335 void setDateTimeModified(const char* value);
336
338 void dropDateTimeModified();
339
341 std::string getDateTimeModifiedSchemaType() const;
342
344 bool haveRecordID() const;
345
347 std::string getRecordID() const;
348
350 void setRecordID(const char* value);
351
353 void dropRecordID();
354
356 std::string getRecordIDSchemaType() const;
357
359 bool isPrivate() const;
360
362 void setPrivate(bool b);
363
365 bool isPrivacyEnabled() const;
366
368 void setPrivacyEnabled(bool b);
369
370 private:
371
372 typedef std::vector< ms_umod_specificity * > specificity_vector;
373 specificity_vector _specificities;
374
375 ms_umod_composition* _delta;
376 bool _delta_set;
377
378 typedef std::vector< ms_umod_composition* > ignore_vector;
379 ignore_vector _ignores;
380
381 typedef std::vector< std::string > altNames_vector;
382 altNames_vector _altnames;
383
384 typedef std::vector< ms_umod_xref* > xref_vector;
385 xref_vector _xrefs;
386
387 std::string _miscNotes;
388 bool _miscNotes_set;
389
390 std::string _title;
391 bool _title_set;
392
393 std::string _fullName;
394 bool _fullName_set;
395
396 bool _approved;
397 bool _approved_set;
398
399 std::string _usernameOfPoster;
400 bool _usernameOfPoster_set;
401
402 std::string _groupOfPoster;
403 bool _groupOfPoster_set;
404
405 std::string _dateTimePosted;
406 bool _dateTimePosted_set;
407
408 std::string _dateTimeModified;
409 bool _dateTimeModified_set;
410
411 std::string _recordID;
412 bool _recordID_set;
413
414 bool _isPrivate;
415 bool _isPrivacyEnabled;
416
417 }; // class ms_umod_modification
418 // end of config_group
420
421} // namespace matrix_science
422
423#endif // MS_UMOD_MODIFICATION_HPP
424
425/*------------------------------- End of File -------------------------------*/
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
Represents a local_definition element.
Definition: ms_quant_localdef.hpp:42
Describes an unmodified element in quantitation.xml.
Definition: ms_quant_unmodified.hpp:39
Represents the composition type in unimod.xml.
Definition: ms_umod_composition.hpp:48
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
Represents a modif object in unimod.xml.
Definition: ms_umod_modification.hpp:47
Represents modification specificity objects in unimod.xml.
Definition: ms_umod_specificity.hpp:43
Represents the cross references objects in unimod.xml.
Definition: ms_umod_xref.hpp:40