Matrix Science header
Public Member Functions

ms_umod_modification Class Reference
[Mascot configuration files module]

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

#include <ms_umod_modification.hpp>

Collaboration diagram for ms_umod_modification:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ms_umod_modification ()
 Default constructor.
 ms_umod_modification (const ms_umod_modification &src)
 Copying constructor.
 ms_umod_modification (const ms_quant_unmodified &src)
 Copying constructor that copies the content from a quantitation.xml object.
 ms_umod_modification (const ms_quant_localdef &src, const ms_umod_configfile &umodFile)
 Copying constructor that copies the content from a quantitation.xml object.
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_umod_modification *right)
 Copies all content from another instance.
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 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

Default constructor.

Assigns reasonable default values to all internal members.

Copying constructor.

Parameters:
srcanother instance of this class to copy the content from.
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.

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

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

Member Function Documentation

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.
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.
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.
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.
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.
void copyFrom ( const ms_quant_unmodified right )

Copies all content from a quantitation.xml object.

Parameters:
righta quantitation object to copy the content from.
void copyFrom ( const ms_umod_modification right )

Copies all content from another instance.

Parameters:
rightanother instance of this class to copy the content from.
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.

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.
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.
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.
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.
void dropApproved (  )

Delete the approved attribute.

Deletes the attribute until it is re-set.

void dropDateTimeModified (  )

Delete the date_time_modified attribute.

Deletes the attribute until it is re-set.

void dropDateTimePosted (  )

Delete the date_time_posted attribute.

Deletes the attribute until it is re-set.

void dropDelta (  )

Delete all information about the currently held delta element.

Deletes the element until it is re-set.

void dropFullName (  )

Delete the full_name attribute.

Deletes the attribute until it is re-set.

void dropGroupOfPoster (  )

Delete the group_of_poster attribute.

Deletes the attribute until it is re-set.

void dropMiscNotes (  )

Delete the misc_notes element.

Deletes the element until it is re-set.

void dropRecordID (  )

Delete the record_id attribute.

Deletes the attribute until it is re-set.

void dropTitle (  )

Delete the title attribute.

Deletes the attribute until it is re-set.

void dropUsernameOfPoster (  )

Delete the username_of_poster attribute.

Deletes the attribute until it is re-set.

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.
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.
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.
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.
std::string getDateTimeModified (  ) const

Returns the value of the date_time_modified attribute.

Returns:
current value of the attribute.
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.
std::string getDateTimePosted (  ) const

Returns the value of the date_time_posted attribute.

Returns:
current value of the attribute.
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.
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.
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.
std::string getFullName (  ) const

Returns the value of the full_name attribute.

A full name for the modification.

Returns:
current value of the attribute.
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.
std::string getGroupOfPoster (  ) const

Returns the value of the group_of_poster attribute.

Returns:
current value of the attribute.
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.
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.
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.
std::string getMiscNotes (  ) const

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

Returns:
current string value of the element.
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.
int getNumberOfSpecificities (  ) const

Returns the number of specificities currently held in memory.

Returns:
total number of specificities in the modification object.
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.
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.
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")
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.
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.
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.
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.
std::string getTitle (  ) const

Returns the value of the title attribute.

A unique name for the modification object.

Returns:
current value of the attribute.
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.
std::string getUsernameOfPoster (  ) const

Returns the value of the username_of_poster attribute.

Returns:
current value of the attribute.
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.
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.
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.
bool haveApproved (  ) const

Indicates presence of the approved attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveDateTimeModified (  ) const

Indicates presence of the date_time_modified attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveDateTimePosted (  ) const

Indicates presence of the date_time_posted attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveDelta (  ) const

Indicates presence of the delta element.

Returns:
TRUE if the element 'delta' is present and FALSE otherwise.
bool haveFullName (  ) const

Indicates presence of the full_name attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveGroupOfPoster (  ) const

Indicates presence of the group_of_poster attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveMiscNotes (  ) const

Indicates presence of the misc_notes element.

Returns:
TRUE if the element is present and FALSE otherwise.
bool haveRecordID (  ) const

Indicates presence of the record_id attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveTitle (  ) const

Indicates presence of the title attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveUsernameOfPoster (  ) const

Indicates presence of the username_of_poster attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool isApproved (  ) const

Returns the value of the approved attribute.

Returns:
current value of the attribute.
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.
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.
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.
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
void setApproved ( const bool  value )

Set a custom value for the approved attribute.

Parameters:
valuea new value for the attribute.
void setDateTimeModified ( const char *  value )

Set a custom value for the date_time_modified attribute.

Parameters:
valuea new value for the attribute.
void setDateTimePosted ( const char *  value )

Set a custom value for the date_time_posted attribute.

Parameters:
valuea new value for the attribute.
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.
void setFullName ( const char *  value )

Set a custom value for the full_name attribute.

Parameters:
valuea new value for the attribute.
void setGroupOfPoster ( const char *  value )

Set a custom value for the group_of_poster attribute.

Parameters:
valuea new value for the attribute.
void setMiscNotes ( const char *  value )

Set a custom value for the misc_notes element.

Parameters:
valuea new value for the element.
void setPrivacyEnabled ( bool  b )

Sets whether privacy settings are enabled for this modification.

Parameters:
bsets if this modification has privacy enabled.
void setPrivate ( bool  b )

Sets whether this modification is private.

Parameters:
bsets if this modification is private.
void setRecordID ( const char *  value )

Set a custom value for the record_id attribute.

Parameters:
valuea new value for the attribute.
void setTitle ( const char *  value )

Set a custom value for the title attribute.

Parameters:
valuea new value for the attribute.
void setUsernameOfPoster ( const char *  value )

Set a custom value for the username_of_poster attribute.

Parameters:
valuea new value for the attribute.
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.
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.
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.
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.
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.
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.
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:

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