19#ifndef MS_UMOD_CONFIGFILE_HPP
20#define MS_UMOD_CONFIGFILE_HPP
27namespace matrix_science {
29 class ms_umod_element;
30 class ms_umod_modification;
31 class ms_umod_aminoacid;
32 class ms_umod_modbrick;
66 MODFILE_FLAGS_EMPTY = 0x00000000,
67 MODFILE_FLAGS_REGULAR = 0x00000001,
68 MODFILE_FLAGS_HIDDEN = 0x00000002,
69 MODFILE_FLAGS_AASUBST = 0x00000004,
70 MODFILE_FLAGS_ALL = 0x7FFFFFFF
94 virtual void defaultValues();
101 std::string getFileName()
const;
104 void setFileName(
const char* filename);
108 void setSchemaFileName(
const char* name);
111 std::string getSchemaFileName()
const;
114 static std::string getDefaultSchemaFileName();
130 void applyVisibility(
const ms_session *session);
133 void applyVisibility(
const std::vector<int> & groupIds);
136 void read_buffer(
const char* buffer);
139 std::string save_buffer(
bool validateAgainstSchema =
true);
143 std::string validateDocument()
const;
147 int getNumberOfElements()
const;
150 void clearElements();
162 bool updateElementByNumber(
const int idx,
const ms_umod_element* element);
165 bool updateElementByName(
const char *name,
const ms_umod_element* element);
168 bool deleteElementByNumber(
const int idx);
171 bool deleteElementByName(
const char *name);
175 std::vector< std::string > getModFileList(
const unsigned int flags = MODFILE_FLAGS_ALL)
const;
178 int findModFileName(
const char * modFileName)
const;
181 int findModification(
const char* modName)
const;
185 int getNumberOfModifications()
const;
188 void clearModifications();
206 bool deleteModificationByNumber(
const int idx);
209 bool deleteModificationByName(
const char *name);
213 int getNumberOfAminoAcids()
const;
216 void clearAminoAcids();
234 bool deleteAminoAcidByNumber(
const int idx);
237 bool deleteAminoAcidByName(
const char *name);
241 int getNumberOfModBricks()
const;
244 void clearModBricks();
262 bool deleteModBrickByNumber(
const int idx);
265 bool deleteModBrickByName(
const char *name);
268 std::string getMajorVersion()
const;
271 std::string getMinorVersion()
const;
274 void setMajorVersion(
const std::string & version);
277 void setMinorVersion(
const std::string & version);
280 void applyVisibilityHelper();
282 std::string m_fileName;
283 std::string m_schemaFileName;
286 typedef std::vector< ms_umod_element* > element_vector;
287 element_vector m_elements;
289 typedef std::vector< ms_umod_modification* > modification_vector;
290 modification_vector m_modifications;
291 typedef std::map<std::string, size_t> modification_index_map;
292 modification_index_map m_modifications_nameToIndex;
294 typedef std::vector< ms_umod_aminoacid* > aminoacid_vector;
295 aminoacid_vector m_aminoacids;
297 typedef std::vector< ms_umod_modbrick* > modbrick_vector;
298 modbrick_vector m_modbricks;
300 std::string m_majorVersion;
301 std::string m_minorVersion;
303 std::string m_encodingName;
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
Use this class to determine if a user is logged in and if they have 'permission' to perform tasks.
Definition: ms_security_session.hpp:123
Represents an "amino acid" object in unimod.xml.
Definition: ms_umod_aminoacid.hpp:41
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
MODFILE_FLAGS
Flags for the type of modifications to retrieve.
Definition: ms_umod_configfile.hpp:65
Represents an element object in unimod.xml.
Definition: ms_umod_element.hpp:40
Represents a modification brick object in unimod.xml.
Definition: ms_umod_modbrick.hpp:41
Represents a modif object in unimod.xml.
Definition: ms_umod_modification.hpp:47