Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_modification Class Reference

Represents a modif object in unimod.xml. More...

#include <ms_umod_modification.hpp>

Inherits ms_xml_IValidatable.

Public Member Functions

 ms_umod_modification ()
 Default constructor.
 
 ms_umod_modification (const ms_quant_localdef &src, const ms_umod_configfile &umodFile)
 Copying constructor that copies the content from a quantitation.xml object.
 
 ms_umod_modification (const ms_quant_unmodified &src)
 Copying constructor that copies the content from a quantitation.xml object.
 
 ms_umod_modification (const ms_umod_modification &src)
 Copying constructor.
 
virtual ~ms_umod_modification ()
 Destructor.
 
void appendAltName (const char *alt_name)
 Adds a new alt_name element at the end of the list.
 
void appendIgnore (const ms_umod_composition *ignore)
 Adds a new Ignore object at the end of the list.
 
void appendSpecificity (const ms_umod_specificity *specificity)
 Adds a new specificity at the end of the list.
 
void appendXref (const ms_umod_xref *xref)
 Adds a new 'xref' object at the end of the list.
 
void clearAltNames ()
 Deletes all alt_name elements from the list.
 
void clearIgnores ()
 Deletes all Ignore elements from the list.
 
void clearSpecificities ()
 Deletes all specificities from the list.
 
void clearXrefs ()
 Deletes all xref elements from the list.
 
void copyFrom (const ms_quant_localdef *right, const ms_umod_configfile &umodFile)
 Copies all content from a quantitation.xml object.
 
void copyFrom (const ms_quant_unmodified *right)
 Copies all content from a quantitation.xml object.
 
void copyFrom (const ms_umod_modification *right)
 Copies all content from another instance.
 
void defaultValues ()
 Call this member if you want to start again.
 
bool deleteAltName (const int idx)
 Remove an alt_name element from the list in memory.
 
bool deleteIgnore (const int idx)
 Remove an Ignore element from the list in memory.
 
bool deleteSpecificity (const int idx)
 Remove a specificity from the list in memory.
 
bool deleteXref (const int idx)
 Remove an xref element from the list in memory.
 
void dropApproved ()
 Delete the approved attribute.
 
void dropDateTimeModified ()
 Delete the date_time_modified attribute.
 
void dropDateTimePosted ()
 Delete the date_time_posted attribute.
 
void dropDelta ()
 Delete all information about the currently held delta element.
 
void dropFullName ()
 Delete the full_name attribute.
 
void dropGroupOfPoster ()
 Delete the group_of_poster attribute.
 
void dropMiscNotes ()
 Delete the misc_notes element.
 
void dropRecordID ()
 Delete the record_id attribute.
 
void dropTitle ()
 Delete the title attribute.
 
void dropUsernameOfPoster ()
 Delete the username_of_poster attribute.
 
int findSpecGroup (const char *modFileName) const
 Retrieves specificity group ID for mod_file-style modification name.
 
std::string getAltName (const int idx) const
 Returns an alt_name element by its number.
 
std::string getAltNameSchemaType () const
 Obtain a symbolic name for the alt_name element schema type.
 
std::string getApprovedSchemaType () const
 Obtain a symbolic name for the approved attribute schema type.
 
std::string getDateTimeModified () const
 Returns the value of the date_time_modified attribute.
 
std::string getDateTimeModifiedSchemaType () const
 Obtain a symbolic name for the date_time_modified attribute schema type.
 
std::string getDateTimePosted () const
 Returns the value of the date_time_posted attribute.
 
std::string getDateTimePostedSchemaType () const
 Obtain a symbolic name for the date_time_posted attribute schema type.
 
const ms_umod_compositiongetDelta () const
 Returns a read-only pointer to the object representing delta element.
 
std::string getDeltaSchemaType () const
 Obtain a symbolic name for the delta element schema type.
 
std::string getFullName () const
 Returns the value of the full_name attribute.
 
std::string getFullNameSchemaType () const
 Obtain a symbolic name for the full_name attribute schema type.
 
std::string getGroupOfPoster () const
 Returns the value of the group_of_poster attribute.
 
std::string getGroupOfPosterSchemaType () const
 Obtain a symbolic name for the group_of_poster attribute schema type.
 
const ms_umod_compositiongetIgnore (const int idx) const
 Returns an Ignore object by its number.
 
std::string getIgnoreSchemaType () const
 Obtain a symbolic name for the Ignore element schema type.
 
std::string getMiscNotes () const
 Returns the misc_notes element or an empty string if not set.
 
std::string getMiscNotesSchemaType () const
 Obtain a symbolic name for the misc_notes element schema type.
 
std::vector< std::string > getModFileList (const unsigned int flags=ms_umod_configfile::MODFILE_FLAGS_ALL) const
 Returns an ordered list of modification names in mod_file-style, i.e. "Acetyl (K)" instead of "Acetyl".
 
int getNumberOfAltNames () const
 Returns the number of alt_name elements currently held in memory.
 
int getNumberOfIgnores () const
 Returns the number of Ignore objects currently held in memory.
 
int getNumberOfSpecificities () const
 Returns the number of specificities currently held in memory.
 
int getNumberOfXrefs () const
 Returns the number of xref elements currently held in memory.
 
std::string getRecordID () const
 Returns the value of the record_id attribute.
 
std::string getRecordIDSchemaType () const
 Obtain a symbolic name for the record_id attribute schema type.
 
virtual std::string getSchemaType () const
 Returns name of the schema type that can be used to validate this element.
 
const ms_umod_specificitygetSpecificity (const int idx) const
 Returns a specificity object by its number.
 
const ms_umod_specificitygetSpecificityBySite (const char *site) const
 Returns a specificity object by its site name.
 
const ms_umod_specificitygetSpecificityBySiteAndPosition (const char *site, const char *position) const
 Returns a specificity object by its site name and position.
 
std::string getSpecificitySchemaType () const
 Obtain a symbolic name for the specificity element schema type.
 
std::string getTitle () const
 Returns the value of the title attribute.
 
std::string getTitleSchemaType () const
 Obtain a symbolic name for the title attribute schema type.
 
std::string getUsernameOfPoster () const
 Returns the value of the username_of_poster attribute.
 
std::string getUsernameOfPosterSchemaType () const
 Obtain a symbolic name for the username_of_poster attribute schema type.
 
const ms_umod_xrefgetXref (const int idx) const
 Returns a read-only pointer to xref element by its number.
 
std::string getXrefSchemaType () const
 Obtain a symbolic name for the xref element schema type.
 
bool haveApproved () const
 Indicates presence of the approved attribute.
 
bool haveDateTimeModified () const
 Indicates presence of the date_time_modified attribute.
 
bool haveDateTimePosted () const
 Indicates presence of the date_time_posted attribute.
 
bool haveDelta () const
 Indicates presence of the delta element.
 
bool haveFullName () const
 Indicates presence of the full_name attribute.
 
bool haveGroupOfPoster () const
 Indicates presence of the group_of_poster attribute.
 
bool haveMiscNotes () const
 Indicates presence of the misc_notes element.
 
bool haveRecordID () const
 Indicates presence of the record_id attribute.
 
bool haveTitle () const
 Indicates presence of the title attribute.
 
bool haveUsernameOfPoster () const
 Indicates presence of the username_of_poster attribute.
 
bool isApproved () const
 Returns the value of the approved attribute.
 
bool isPrivacyEnabled () const
 Indicates whether privacy settings are enabled for this modification.
 
bool isPrivate () const
 Indicates whether this modification is private and so cannot be viewed or used. Only valid if privacy is enabled.
 
bool isSameAs (const ms_umod_modification &right_mod) const
 Returns true if instances contain the same information.
 
ms_umod_modificationoperator= (const ms_umod_modification &right)
 C++ style assignment operator.
 
void setApproved (const bool value)
 Set a custom value for the approved attribute.
 
void setDateTimeModified (const char *value)
 Set a custom value for the date_time_modified attribute.
 
void setDateTimePosted (const char *value)
 Set a custom value for the date_time_posted attribute.
 
void setDelta (const ms_umod_composition *delta)
 Supply new content for the delta element.
 
void setFullName (const char *value)
 Set a custom value for the full_name attribute.
 
void setGroupOfPoster (const char *value)
 Set a custom value for the group_of_poster attribute.
 
void setMiscNotes (const char *value)
 Set a custom value for the misc_notes element.
 
void setPrivacyEnabled (bool b)
 Sets whether privacy settings are enabled for this modification.
 
void setPrivate (bool b)
 Sets whether this modification is private.
 
void setRecordID (const char *value)
 Set a custom value for the record_id attribute.
 
void setTitle (const char *value)
 Set a custom value for the title attribute.
 
void setUsernameOfPoster (const char *value)
 Set a custom value for the username_of_poster attribute.
 
bool updateAltName (const int idx, const char *alt_name)
 Update the string for a particular alt_name element.
 
bool updateIgnore (const int idx, const ms_umod_composition *ignore)
 Update the information for a particular Ignore element.
 
void updateMasses (const ms_umod_configfile &umodFile, const ms_quant_component &quantComp)
 Recalculates all deltas with isotope-substitution according to selected component in quantification.xml.
 
bool updateSpecificity (const int idx, const ms_umod_specificity *specificity)
 Update the information for a particular specificity.
 
bool updateXref (const int idx, const ms_umod_xref *xref)
 Update the information for a particular xref element.
 
virtual std::string validateDeep (const ms_xml_schema *pSchemaFileObj) const
 Performs validation of all child elements in addition to 'shallow' validation.
 
virtual std::string validateShallow (const ms_xml_schema *pSchemaFileObj) const
 Performs simple validation of the top-level elements only.
 

Detailed Description

Represents a modif object in unimod.xml.

Constructor & Destructor Documentation

◆ ms_umod_modification() [1/4]

Default constructor.

Assigns reasonable default values to all internal members.

◆ ms_umod_modification() [2/4]

Copying constructor.

Parameters
srcanother instance of this class to copy the content from.

◆ ms_umod_modification() [3/4]

ms_umod_modification ( const ms_quant_localdef src,
const ms_umod_configfile umodFile 
)

Copying constructor that copies the content from a quantitation.xml object.

Parameters
srca quantitation.xml object to copy the content from.
umodFilean instance of a Unimod file object to extract element masses.

◆ ms_umod_modification() [4/4]

Copying constructor that copies the content from a quantitation.xml object.

Parameters
srca quantitation.xml object to copy the content from.

Member Function Documentation

◆ appendAltName()

void appendAltName ( const char *  alt_name)

Adds a new alt_name element at the end of the list.

Creates a new alt_name element, sets it to the supplied string value and adds it at the end of the alt_name elements list.

Parameters
alt_namea string value for the new element.

◆ appendIgnore()

void appendIgnore ( const ms_umod_composition ignore)

Adds a new Ignore object at the end of the list.

Creates a new Ignore element, copies all content from the object supplied as a parameter and adds it at the end of the ignores list.

Parameters
ignorean Ignore object to copy the content from.

◆ appendSpecificity()

void appendSpecificity ( const ms_umod_specificity specificity)

Adds a new specificity at the end of the list.

Creates a new specificity object, copies all content from the object supplied as a parameter and adds it at the end of the specificities list.

Parameters
specificityan instance of specificity object to copy the content from.

◆ appendXref()

void appendXref ( const ms_umod_xref xref)

Adds a new 'xref' object at the end of the list.

Creates a new xref element, copies all content from the object supplied as a parameter and adds it at the end of the xref elements list.

Parameters
xrefan xref object to copy the content from.

◆ copyFrom() [1/3]

void copyFrom ( const ms_quant_localdef right,
const ms_umod_configfile umodFile 
)

Copies all content from a quantitation.xml object.

Parameters
righta quantitation object to copy the content from.
umodFilea Unimod file object to extract element masses from.

◆ copyFrom() [2/3]

void copyFrom ( const ms_quant_unmodified right)

Copies all content from a quantitation.xml object.

Parameters
righta quantitation object to copy the content from.

◆ copyFrom() [3/3]

void copyFrom ( const ms_umod_modification right)

Copies all content from another instance.

Parameters
rightanother instance of this class to copy the content from.

◆ defaultValues()

void defaultValues ( )

Call this member if you want to start again.

All internal values are reset to their defaults, as if the object had been freshly created with the default constructor.

◆ deleteAltName()

bool deleteAltName ( const int  idx)

Remove an alt_name element from the list in memory.

Parameters
idxnumber of the alt_name element for deletion from 0 to (getNumberOfAltNames() - 1).
Returns
TRUE if the element has been found and successfully deleted and FALSE otherwise.

◆ deleteIgnore()

bool deleteIgnore ( const int  idx)

Remove an Ignore element from the list in memory.

Parameters
idxnumber of the Ignore element for deletion from 0 to (getNumberOfIgnores() - 1).
Returns
TRUE if the element has been found and successfully deleted and FALSE otherwise.

◆ deleteSpecificity()

bool deleteSpecificity ( const int  idx)

Remove a specificity from the list in memory.

Parameters
idxnumber of the specificity for deletion from 0 to (getNumberOfSpecificities() - 1).
Returns
TRUE if the specificity has been found and successfully deleted and FALSE otherwise.

◆ deleteXref()

bool deleteXref ( const int  idx)

Remove an xref element from the list in memory.

Parameters
idxnumber of the xref element for deletion from 0 to (getNumberOfXrefs() - 1).
Returns
TRUE if the element has been found and successfully deleted and FALSE otherwise.

◆ dropApproved()

void dropApproved ( )

Delete the approved attribute.

Deletes the attribute until it is re-set.

◆ dropDateTimeModified()

void dropDateTimeModified ( )

Delete the date_time_modified attribute.

Deletes the attribute until it is re-set.

◆ dropDateTimePosted()

void dropDateTimePosted ( )

Delete the date_time_posted attribute.

Deletes the attribute until it is re-set.

◆ dropDelta()

void dropDelta ( )

Delete all information about the currently held delta element.

Deletes the element until it is re-set.

◆ dropFullName()

void dropFullName ( )

Delete the full_name attribute.

Deletes the attribute until it is re-set.

◆ dropGroupOfPoster()

void dropGroupOfPoster ( )

Delete the group_of_poster attribute.

Deletes the attribute until it is re-set.

◆ dropMiscNotes()

void dropMiscNotes ( )

Delete the misc_notes element.

Deletes the element until it is re-set.

◆ dropRecordID()

void dropRecordID ( )

Delete the record_id attribute.

Deletes the attribute until it is re-set.

◆ dropTitle()

void dropTitle ( )

Delete the title attribute.

Deletes the attribute until it is re-set.

◆ dropUsernameOfPoster()

void dropUsernameOfPoster ( )

Delete the username_of_poster attribute.

Deletes the attribute until it is re-set.

◆ findSpecGroup()

int findSpecGroup ( const char *  modFileName) const

Retrieves specificity group ID for mod_file-style modification name.

As each modification from unimod.xml can be converted into several mod_file-style modifications, we have to be able to find the right specificity group for a given mod_file-style name.

Parameters
modFileNamemod_file-style modification name (like 'Acetyl (K)').
Returns
specificity group ID which can be used to extract just a single mod_file-style modification from a Unimod-style modification. If the specificity not found -1 will be returned.

◆ getAltName()

std::string getAltName ( const int  idx) const

Returns an alt_name element by its number.

Retrieves an alt_name element from the list by its number.

Parameters
idxnumber of the alt_name element from 0 to (getNumberOfAltNames() - 1).
Returns
the retrieved string value.

◆ getAltNameSchemaType()

std::string getAltNameSchemaType ( ) const

Obtain a symbolic name for the alt_name element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getApprovedSchemaType()

std::string getApprovedSchemaType ( ) const

Obtain a symbolic name for the approved attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getDateTimeModified()

std::string getDateTimeModified ( ) const

Returns the value of the date_time_modified attribute.

Returns
current value of the attribute.

◆ getDateTimeModifiedSchemaType()

std::string getDateTimeModifiedSchemaType ( ) const

Obtain a symbolic name for the date_time_modified attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getDateTimePosted()

std::string getDateTimePosted ( ) const

Returns the value of the date_time_posted attribute.

Returns
current value of the attribute.

◆ getDateTimePostedSchemaType()

std::string getDateTimePostedSchemaType ( ) const

Obtain a symbolic name for the date_time_posted attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getDelta()

const ms_umod_composition * getDelta ( ) const

Returns a read-only pointer to the object representing delta element.

Modification delta which is represented as a composition of chemical elements.

Returns
read-only pointer to the 'delta' object. See Maintaining object references: two rules of thumb.

◆ getDeltaSchemaType()

std::string getDeltaSchemaType ( ) const

Obtain a symbolic name for the delta element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getFullName()

std::string getFullName ( ) const

Returns the value of the full_name attribute.

A full name for the modification.

Returns
current value of the attribute.

◆ getFullNameSchemaType()

std::string getFullNameSchemaType ( ) const

Obtain a symbolic name for the full_name attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getGroupOfPoster()

std::string getGroupOfPoster ( ) const

Returns the value of the group_of_poster attribute.

Returns
current value of the attribute.

◆ getGroupOfPosterSchemaType()

std::string getGroupOfPosterSchemaType ( ) const

Obtain a symbolic name for the group_of_poster attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getIgnore()

const ms_umod_composition * getIgnore ( const int  idx) const

Returns an Ignore object by its number.

Parameters
idxnumber of the Ignore element from 0 to (getNumberOfIgnores() - 1).
Returns
a read-only pointer to the retrieved object. See Maintaining object references: two rules of thumb.

◆ getIgnoreSchemaType()

std::string getIgnoreSchemaType ( ) const

Obtain a symbolic name for the Ignore element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getMiscNotes()

std::string getMiscNotes ( ) const

Returns the misc_notes element or an empty string if not set.

Returns
current string value of the element.

◆ getMiscNotesSchemaType()

std::string getMiscNotesSchemaType ( ) const

Obtain a symbolic name for the misc_notes element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getNumberOfSpecificities()

int getNumberOfSpecificities ( ) const

Returns the number of specificities currently held in memory.

Returns
total number of specificities in the modification object.

◆ getRecordID()

std::string getRecordID ( ) const

Returns the value of the record_id attribute.

The unique and stable record ID for the unimod record. Added in Mascot Parser version 2.3.01.

Note that in previous versions of parser, this attribute was not loaded or saved from files. This means that files created by the Mascot Server 2.2 configuration editor strip out the record ID. It also means that the Unimod fragments contained in the Mascot results files from version 2.2 do not contain the record ID.

Returns
current value of the attribute.

◆ getRecordIDSchemaType()

std::string getRecordIDSchemaType ( ) const

Obtain a symbolic name for the record_id attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getSchemaType()

std::string getSchemaType ( ) const
virtual

Returns name of the schema type that can be used to validate this element.

Additional information about the current object can be retrieved from the associated XML schema file. Every element in an XML document is defined with a named type, which you can use to find out what kind of limits (numerical or otherwise) are defined for values of that type.

See also
validateShallow(), validateDeep()
Returns
a symbolic fully qualified type name (for example, "umod:nameType")

◆ getSpecificity()

const ms_umod_specificity * getSpecificity ( const int  idx) const

Returns a specificity object by its number.

Parameters
idxnumber of the specificity from 0 to (getNumberOfSpecificities() - 1).
Returns
a read-only pointer to the retrieved object. See Maintaining object references: two rules of thumb.

◆ getSpecificityBySite()

const ms_umod_specificity * getSpecificityBySite ( const char *  site) const

Returns a specificity object by its site name.

Multiple specificities may exist for a given site with differing position definitions. This method returns the first specificity found with the same site definition. Use ms_umod_modification::getSpecificityBySiteAndPosition to obtain a specificity by bot site and position.

Parameters
siteName of the specificity to return. String that should be one of the Type mqm:siteType values.
Returns
a read-only pointer to the retrieved object, can be NULL if specificity for the site is not yet defined. See Maintaining object references: two rules of thumb.

◆ getSpecificityBySiteAndPosition()

const ms_umod_specificity * getSpecificityBySiteAndPosition ( const char *  site,
const char *  position 
) const

Returns a specificity object by its site name and position.

Multiple specificities may exist for a given site with differing position definitions.

Parameters
siteName of the specificity to return. String that should be one of the Type mqm:siteType values.
positionPosition of the specificity to return. String that should be one of the Type mqm:positionType values.
Returns
a read-only pointer to the retrieved object, can be NULL if specificity for the site is not yet defined. See Maintaining object references: two rules of thumb.

◆ getSpecificitySchemaType()

std::string getSpecificitySchemaType ( ) const

Obtain a symbolic name for the specificity element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getTitle()

std::string getTitle ( ) const

Returns the value of the title attribute.

A unique name for the modification object.

Returns
current value of the attribute.

◆ getTitleSchemaType()

std::string getTitleSchemaType ( ) const

Obtain a symbolic name for the title attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getUsernameOfPoster()

std::string getUsernameOfPoster ( ) const

Returns the value of the username_of_poster attribute.

Returns
current value of the attribute.

◆ getUsernameOfPosterSchemaType()

std::string getUsernameOfPosterSchemaType ( ) const

Obtain a symbolic name for the username_of_poster attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getXref()

const ms_umod_xref * getXref ( const int  idx) const

Returns a read-only pointer to xref element by its number.

Parameters
idxnumber of the 'xref' element from 0 to (getNumberOfXrefs() - 1).
Returns
a read-only pointer to the retrieved object. See Maintaining object references: two rules of thumb.

◆ getXrefSchemaType()

std::string getXrefSchemaType ( ) const

Obtain a symbolic name for the xref element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ haveApproved()

bool haveApproved ( ) const

Indicates presence of the approved attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveDateTimeModified()

bool haveDateTimeModified ( ) const

Indicates presence of the date_time_modified attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveDateTimePosted()

bool haveDateTimePosted ( ) const

Indicates presence of the date_time_posted attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveDelta()

bool haveDelta ( ) const

Indicates presence of the delta element.

Returns
TRUE if the element 'delta' is present and FALSE otherwise.

◆ haveFullName()

bool haveFullName ( ) const

Indicates presence of the full_name attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveGroupOfPoster()

bool haveGroupOfPoster ( ) const

Indicates presence of the group_of_poster attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveMiscNotes()

bool haveMiscNotes ( ) const

Indicates presence of the misc_notes element.

Returns
TRUE if the element is present and FALSE otherwise.

◆ haveRecordID()

bool haveRecordID ( ) const

Indicates presence of the record_id attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveTitle()

bool haveTitle ( ) const

Indicates presence of the title attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveUsernameOfPoster()

bool haveUsernameOfPoster ( ) const

Indicates presence of the username_of_poster attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ isApproved()

bool isApproved ( ) const

Returns the value of the approved attribute.

Returns
current value of the attribute.

◆ isPrivacyEnabled()

bool isPrivacyEnabled ( ) const

Indicates whether privacy settings are enabled for this modification.

Returns
true if this modification has privacy enabled. Note: Not part of the Unimod schema file.

◆ isPrivate()

bool isPrivate ( ) const

Indicates whether this modification is private and so cannot be viewed or used. Only valid if privacy is enabled.

Returns
true if this modification is private and so cannot be viewed or used. Only valid if privacy is enabled. Note: Not part of the Unimod schema file.

◆ isSameAs()

bool isSameAs ( const ms_umod_modification right_mod) const

Returns true if instances contain the same information.

Compares all data members except modified date, posted date and user.

Parameters
right_modanother instance of this class to compare.
Returns
true if objects contain same information.

◆ operator=()

ms_umod_modification & operator= ( const ms_umod_modification right)

C++ style assignment operator.

Parameters
rightanother instance of this class to copy the content from.
Returns
reference to the current object

◆ setApproved()

void setApproved ( const bool  value)

Set a custom value for the approved attribute.

Parameters
valuea new value for the attribute.

◆ setDateTimeModified()

void setDateTimeModified ( const char *  value)

Set a custom value for the date_time_modified attribute.

Parameters
valuea new value for the attribute.

◆ setDateTimePosted()

void setDateTimePosted ( const char *  value)

Set a custom value for the date_time_posted attribute.

Parameters
valuea new value for the attribute.

◆ setDelta()

void setDelta ( const ms_umod_composition delta)

Supply new content for the delta element.

Parameters
deltanew content for the 'delta' object. If a NULL pointer is supplied instead of an object, the current content will be deleted and the 'delta' element will be dropped.

◆ setFullName()

void setFullName ( const char *  value)

Set a custom value for the full_name attribute.

Parameters
valuea new value for the attribute.

◆ setGroupOfPoster()

void setGroupOfPoster ( const char *  value)

Set a custom value for the group_of_poster attribute.

Parameters
valuea new value for the attribute.

◆ setMiscNotes()

void setMiscNotes ( const char *  value)

Set a custom value for the misc_notes element.

Parameters
valuea new value for the element.

◆ setPrivacyEnabled()

void setPrivacyEnabled ( bool  b)

Sets whether privacy settings are enabled for this modification.

Parameters
bsets if this modification has privacy enabled.

◆ setPrivate()

void setPrivate ( bool  b)

Sets whether this modification is private.

Parameters
bsets if this modification is private.

◆ setRecordID()

void setRecordID ( const char *  value)

Set a custom value for the record_id attribute.

Parameters
valuea new value for the attribute.

◆ setTitle()

void setTitle ( const char *  value)

Set a custom value for the title attribute.

Parameters
valuea new value for the attribute.

◆ setUsernameOfPoster()

void setUsernameOfPoster ( const char *  value)

Set a custom value for the username_of_poster attribute.

Parameters
valuea new value for the attribute.

◆ updateAltName()

bool updateAltName ( const int  idx,
const char *  alt_name 
)

Update the string for a particular alt_name element.

Parameters
idxnumber of the alt_name element for updating from 0 to (getNumberOfAltNames() - 1).
alt_namean object to copy the content from.
Returns
TRUE if the element has been found and successfully updated and FALSE otherwise.

◆ updateIgnore()

bool updateIgnore ( const int  idx,
const ms_umod_composition ignore 
)

Update the information for a particular Ignore element.

Parameters
idxnumber of the Ignore element for updating from 0 to (getNumberOfIgnores() - 1).
ignorean object to copy the content from.
Returns
TRUE if the object has been found and successfully updated and FALSE otherwise.

◆ updateMasses()

void updateMasses ( const ms_umod_configfile umodFile,
const ms_quant_component quantComp 
)

Recalculates all deltas with isotope-substitution according to selected component in quantification.xml.

The method updates all deltas, neutral losses and ignore masses according to the selected isotope substitution. Masses are recalculated only in the current modification object, not in the whole Unimod file object umodFile. The Unimod file object is used only to retrieve masses of elements and their isotopes.

Parameters
umodFilea Unimod file object.
quantCompa component object from the quantitation.xml file.

◆ updateSpecificity()

bool updateSpecificity ( const int  idx,
const ms_umod_specificity specificity 
)

Update the information for a particular specificity.

Parameters
idxnumber of the specificity for updating from 0 to (getNumberOfSpecificities() - 1).
specificityan object to copy the content from.
Returns
TRUE if the specificity has been found and successfully updated and FALSE otherwise.

◆ updateXref()

bool updateXref ( const int  idx,
const ms_umod_xref xref 
)

Update the information for a particular xref element.

Parameters
idxnumber of the xref element for updating from 0 to (getNumberOfXrefs() - 1)
xrefan object to copy the content from.
Returns
TRUE if the object has been found and successfully updated and FALSE otherwise.

◆ validateDeep()

std::string validateDeep ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs validation of all child elements in addition to 'shallow' validation.

The current object can be checked against an XML schema. When using this method all possible checks are performed. However, this is not a substitute for the schema: some schema-defined constraint are not applied (unique fields, foreign keys etc.).

In order to make sure that current object is free from all syntax errors validate it as a part of the whole document.

See also
validateShallow(), getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

◆ validateShallow()

std::string validateShallow ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs simple validation of the top-level elements only.

The current object can be checked against some basic constraints in a schema without looking at children element types. When using this method only the current object and children derived from standard types (for example, restrictions with enumerations) are checked. For more thorough validation, use validateDeep().

See also
getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

The documentation for this class was generated from the following files: