Matrix Science header

ms_umod_modification.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_modification.hpp                                             #
00004 # 'msparser' toolkit                                                         #
00005 # Represents modification object in unimod.xml file                          #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: parser/inc/ms_umod_modification.hpp $
00012  * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $
00013  * @(#)$Date: 2018-07-30 16:23:53 +0100 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_MODIFICATION_HPP
00018 #define MS_UMOD_MODIFICATION_HPP
00019 
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 // forward declarations
00025 namespace msparser_internal {
00026     class ms_umod_xmlloader;
00027 }
00028 
00029 namespace matrix_science {
00030 
00031     class ms_umod_composition; // forward declaration
00032     class ms_umod_specificity;  // forward declaration
00033     class ms_umod_xref; // forward declaration
00034     class ms_quant_localdef; // forward declaration
00035     class ms_quant_unmodified;  // forward declaration
00036     class ms_umod_configfile; // forward declaration
00037     class ms_quant_component; // forward declaration
00038     class ms_xml_schema; // forward declaration
00039 
00045 
00046     class MS_MASCOTRESFILE_API ms_umod_modification: public ms_xml_IValidatable
00047     {
00048         friend class msparser_internal::ms_umod_xmlloader;
00049         friend class ms_umod_configfile;
00050 
00051     public:
00053         ms_umod_modification();
00054 
00056         ms_umod_modification(const ms_umod_modification& src);
00057 
00059         ms_umod_modification(const ms_quant_localdef& src, const ms_umod_configfile& umodFile);
00060 
00062         ms_umod_modification(const ms_quant_unmodified& src);
00063 
00065         void updateMasses(const ms_umod_configfile& umodFile, const ms_quant_component& quantComp);
00066 
00068         virtual ~ms_umod_modification();
00069 
00071         void defaultValues();
00072 
00074         void copyFrom(const ms_umod_modification* right);
00075 
00077         void copyFrom(const ms_quant_localdef* right, const ms_umod_configfile& umodFile);
00078 
00080         void copyFrom(const ms_quant_unmodified* right);
00081 
00082 #ifndef SWIG
00083 
00084         ms_umod_modification& operator=(const ms_umod_modification& right);
00085 #endif
00086 
00088         bool isSameAs(const ms_umod_modification& right_mod) const;
00089 
00091         virtual std::string getSchemaType() const;
00092 
00094         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00095 
00097         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00098 
00099 
00101         std::vector< std::string > getModFileList(const unsigned int flags = ms_umod_configfile::MODFILE_FLAGS_ALL) const;
00102 
00104         int findSpecGroup(const char* modFileName) const;
00105 
00107         int getNumberOfSpecificities() const;
00108 
00110         void clearSpecificities();
00111 
00113         void appendSpecificity(const ms_umod_specificity *specificity);
00114 
00116         const ms_umod_specificity * getSpecificity(const int idx) const;
00117 
00119         const ms_umod_specificity * getSpecificityBySite(const char *site) const;
00120 
00122         const ms_umod_specificity * getSpecificityBySiteAndPosition(const char *site, const char *position) const;
00123 
00125         bool updateSpecificity(const int idx, const ms_umod_specificity *specificity);
00126 
00128         bool deleteSpecificity(const int idx);
00129 
00131         std::string getSpecificitySchemaType() const;
00132 
00133 
00135         bool haveDelta() const;
00136 
00138         const ms_umod_composition* getDelta() const;
00139 
00141         void setDelta(const ms_umod_composition* delta);
00142 
00144         void dropDelta();
00145 
00147         std::string getDeltaSchemaType() const;
00148 
00149 
00151         int getNumberOfIgnores() const;
00152 
00154         void clearIgnores();
00155 
00157         void appendIgnore(const ms_umod_composition *ignore);
00158 
00160         const ms_umod_composition * getIgnore(const int idx) const;
00161 
00163         bool updateIgnore(const int idx, const ms_umod_composition *ignore);
00164 
00166         bool deleteIgnore(const int idx);
00167 
00169         std::string getIgnoreSchemaType() const;
00170 
00171 
00173         int getNumberOfAltNames() const;
00174 
00176         void clearAltNames();
00177 
00179         void appendAltName(const char *alt_name);
00180 
00182         std::string getAltName(const int idx) const;
00183 
00185         bool updateAltName(const int idx, const char *alt_name);
00186 
00188         bool deleteAltName(const int idx);
00189 
00191         std::string getAltNameSchemaType() const;
00192 
00193 
00195         int getNumberOfXrefs() const;
00196 
00198         void clearXrefs();
00199 
00201         void appendXref(const ms_umod_xref *xref);
00202 
00204         const ms_umod_xref* getXref(const int idx) const;
00205 
00207         bool updateXref(const int idx, const ms_umod_xref *xref);
00208 
00210         bool deleteXref(const int idx);
00211 
00213         std::string getXrefSchemaType() const;
00214 
00215 
00217         bool haveMiscNotes() const;
00218 
00220         std::string getMiscNotes() const;
00221 
00223         void setMiscNotes(const char* value);
00224 
00226         void dropMiscNotes();
00227 
00229         std::string getMiscNotesSchemaType() const;
00230 
00231 
00233         bool haveTitle() const;
00234 
00236         std::string getTitle() const;
00237 
00239         void setTitle(const char* value);
00240 
00242         void dropTitle();
00243 
00245         std::string getTitleSchemaType() const;
00246 
00247 
00249         bool haveFullName() const;
00250 
00252         std::string getFullName() const;
00253 
00255         void setFullName(const char* value);
00256 
00258         void dropFullName();
00259 
00261         std::string getFullNameSchemaType() const;
00262 
00263 
00265         bool haveApproved() const;
00266 
00268         bool isApproved() const;
00269 
00271         void setApproved(const bool value);
00272 
00274         void dropApproved();
00275 
00277         std::string getApprovedSchemaType() const;
00278 
00279 
00281         bool haveUsernameOfPoster() const;
00282 
00284         std::string getUsernameOfPoster() const;
00285 
00287         void setUsernameOfPoster(const char* value);
00288 
00290         void dropUsernameOfPoster();
00291 
00293         std::string getUsernameOfPosterSchemaType() const;
00294 
00295 
00297         bool haveGroupOfPoster() const;
00298 
00300         std::string getGroupOfPoster() const;
00301 
00303         void setGroupOfPoster(const char* value);
00304 
00306         void dropGroupOfPoster();
00307 
00309         std::string getGroupOfPosterSchemaType() const;
00310 
00311 
00313         bool haveDateTimePosted() const;
00314 
00316         std::string getDateTimePosted() const;
00317 
00319         void setDateTimePosted(const char* value);
00320 
00322         void dropDateTimePosted();
00323 
00325         std::string getDateTimePostedSchemaType() const;
00326 
00327 
00329         bool haveDateTimeModified() const;
00330 
00332         std::string getDateTimeModified() const;
00333 
00335         void setDateTimeModified(const char* value);
00336 
00338         void dropDateTimeModified();
00339 
00341         std::string getDateTimeModifiedSchemaType() const;
00342 
00344         bool haveRecordID() const;
00345 
00347         std::string getRecordID() const;
00348 
00350         void setRecordID(const char* value);
00351 
00353         void dropRecordID();
00354 
00356         std::string getRecordIDSchemaType() const;
00357 
00359         bool isPrivate() const;
00360 
00362         void setPrivate(bool b);
00363 
00365         bool isPrivacyEnabled() const;
00366 
00368         void setPrivacyEnabled(bool b);
00369 
00370     private:
00371 
00372         typedef std::vector< ms_umod_specificity * > specificity_vector;
00373         specificity_vector _specificities;
00374 
00375         ms_umod_composition* _delta;
00376         bool _delta_set;
00377 
00378         typedef std::vector< ms_umod_composition* > ignore_vector;
00379         ignore_vector _ignores;
00380 
00381         typedef std::vector< std::string > altNames_vector;
00382         altNames_vector _altnames;
00383 
00384         typedef std::vector< ms_umod_xref* > xref_vector;
00385         xref_vector _xrefs;
00386 
00387         std::string _miscNotes;
00388         bool _miscNotes_set;
00389 
00390         std::string _title;
00391         bool _title_set;
00392 
00393         std::string _fullName;
00394         bool _fullName_set;
00395 
00396         bool _approved;
00397         bool _approved_set;
00398 
00399         std::string _usernameOfPoster;
00400         bool _usernameOfPoster_set;
00401 
00402         std::string _groupOfPoster;
00403         bool _groupOfPoster_set;
00404 
00405         std::string _dateTimePosted;
00406         bool _dateTimePosted_set;
00407 
00408         std::string _dateTimeModified;
00409         bool _dateTimeModified_set;
00410 
00411         std::string _recordID;
00412         bool _recordID_set;
00413 
00414         bool _isPrivate;
00415         bool _isPrivacyEnabled;
00416 
00417     }; // class ms_umod_modification
00418  // end of config_group
00420 
00421 } // namespace matrix_science
00422 
00423 #endif // MS_UMOD_MODIFICATION_HPP
00424 
00425 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30