Represents modification specificity objects in unimod.xml
.
More...
#include <ms_umod_specificity.hpp>
Public Member Functions | |
ms_umod_specificity () | |
Default constructor. | |
ms_umod_specificity (const ms_quant_specificity &src, const ms_umod_configfile &umodFile) | |
Copying constructor that takes an object from quantitation.xml . | |
ms_umod_specificity (const ms_umod_specificity &src) | |
Copying constructor. | |
virtual | ~ms_umod_specificity () |
Destructor. | |
void | appendNeutralLoss (const ms_umod_neutralloss *nl) |
Adds a new 'NeutralLoss' element at the end of the list. | |
void | appendPepNeutralLoss (const ms_umod_neutralloss *pnl) |
Adds a new 'PepNeutralLoss' element at the end of the list. | |
void | clearNeutralLosses () |
Deletes all 'NeutralLoss' elements from the list. | |
void | clearPepNeutralLosses () |
Deletes all 'PepNeutralLoss' elements from the list. | |
void | copyFrom (const ms_quant_specificity *right, const ms_umod_configfile &umodFile) |
Copies all content from an object of quantitation.xml . | |
void | copyFrom (const ms_umod_specificity *right) |
Copies all content from another instance. | |
void | defaultValues () |
Call this member if you want to start again. | |
bool | deleteNeutralLoss (const int idx) |
Remove a 'NeutralLoss' element from the list in memory. | |
bool | deletePepNeutralLoss (const int idx) |
Remove a 'PepNeutralLoss' element object from the list in memory. | |
void | dropClassification () |
Delete the classification attribute. | |
void | dropHidden () |
Delete the hidden attribute. | |
void | dropMiscNotes () |
Delete the misc_notes element. | |
void | dropPosition () |
Delete the position attribute. | |
void | dropSite () |
Delete the site attribute. | |
void | dropSpecGroup () |
Delete the spec_group attribute. | |
std::string | getClassification () const |
Returns the value of the classification attribute. | |
std::string | getClassificationSchemaType () const |
Obtain a symbolic name for the classification attribute schema type. | |
std::string | getHiddenSchemaType () const |
Obtain a symbolic name for the hidden attribute schema type. | |
std::string | getMiscNotes () const |
Returns the value of the misc_notes element. | |
std::string | getMiscNotesSchemaType () const |
Obtain a symbolic name for the misc_notes element schema type. | |
const ms_umod_neutralloss * | getNeutralLoss (const int idx) const |
Returns a read-only pointer to a 'NeutralLoss' element by its number. | |
std::string | getNeutralLossSchemaType () const |
Obtain a symbolic name for the 'NeutralLoss' element schema type. | |
int | getNumberOfNeutralLosses () const |
Returns the number of 'NeutralLoss' elements currently held in memory. | |
int | getNumberOfPepNeutralLosses () const |
Returns the number of 'PepNeutralLoss' elements currently held in memory. | |
const ms_umod_neutralloss * | getPepNeutralLoss (const int idx) const |
Returns a read-only pointer to a 'PepNeutralLoss' element object by its number. | |
std::string | getPepNeutralLossSchemaType () const |
Obtain a symbolic name for the 'NeutralLoss' element schema type. | |
std::string | getPosition () const |
Returns the value of the position attribute. | |
std::string | getPositionSchemaType () const |
Obtain a symbolic name for the position attribute schema type. | |
virtual std::string | getSchemaType () const |
Returns name of the schema type that can be used to validate this element. | |
std::string | getSite () const |
Returns the value of the site attribute. | |
std::string | getSiteSchemaType () const |
Obtain a symbolic name for the site attribute schema type. | |
int | getSpecGroup () const |
Returns the value of the spec_group attribute. | |
std::string | getSpecGroupSchemaType () const |
Obtain a symbolic name for the spec_group attribute schema type. | |
bool | haveClassification () const |
Indicates presence of the classification attribute. | |
bool | haveHidden () const |
Indicates presence of the hidden attribute. | |
bool | haveMiscNotes () const |
Indicates presence of the misc_notes element. | |
bool | havePosition () const |
Indicates presence of the position attribute. | |
bool | haveSite () const |
Indicates presence of the site attribute. | |
bool | haveSpecGroup () const |
Indicates presence of the spec_group attribute. | |
bool | inErrorTolerant () const |
bool | inLongList () const |
Indicates whether this specificity is in the full list on the Mascot search form. | |
bool | inShortList () const |
Indicates whether this specificity is in the short list on the Mascot search form. | |
bool | isHidden () const |
Returns the value of the hidden attribute. | |
bool | isSameAs (const ms_umod_specificity &right) const |
Returns true if instances contain the same information. | |
ms_umod_specificity & | operator= (const ms_umod_specificity &right) |
C++ style assignment operator. | |
void | setClassification (const char *value) |
Set a custom value for the classification attribute. | |
void | setHidden (const bool value) |
Set a custom value for the hidden attribute. | |
void | setMiscNotes (const char *value) |
Set a custom value for the misc_notes element. | |
void | setPosition (const char *value) |
Set a custom value for the position attribute. | |
void | setSite (const char *value) |
Set a custom value for the site attribute. | |
void | setSpecGroup (const int value) |
Set a custom value for the spec_group attribute. | |
void | showInLongList (bool b) |
void | showInShortList (bool b) |
bool | updateNeutralLoss (const int idx, const ms_umod_neutralloss *nl) |
Update the information for a particular 'NeutralLoss' element. | |
bool | updatePepNeutralLoss (const int idx, const ms_umod_neutralloss *pnl) |
Update the information for a particular 'PepNeutralLoss' element. | |
void | useInErrorTolerant (bool b) |
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. | |
Represents modification specificity objects in unimod.xml
.
Default constructor.
Assigns reasonable default values to all internal members.
ms_umod_specificity | ( | const ms_umod_specificity & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
ms_umod_specificity | ( | const ms_quant_specificity & | src, |
const ms_umod_configfile & | umodFile | ||
) |
Copying constructor that takes an object from quantitation.xml
.
src | an instance of quantitation.xml class to copy the content from. |
umodFile | a Unimod file object to extract element masses from. |
void appendNeutralLoss | ( | const ms_umod_neutralloss * | nl | ) |
Adds a new 'NeutralLoss' element at the end of the list.
Creates a new neutral loss object, copies all content from the object supplied as a parameter and adds it at the end of the list.
nl | an instance of neutral loss object to copy the content from. |
void appendPepNeutralLoss | ( | const ms_umod_neutralloss * | pnl | ) |
Adds a new 'PepNeutralLoss' element at the end of the list.
Creates a new peptide neutral loss object, copies all content from the object supplied as a parameter and adds it at the end of the list.
pnl | an instance of peptide neutral loss object to copy the content from. |
void copyFrom | ( | const ms_quant_specificity * | right, |
const ms_umod_configfile & | umodFile | ||
) |
Copies all content from an object of quantitation.xml
.
right | an instance of a quantitation.xml class. |
umodFile | a Unimod file object to extract element masses from. |
void copyFrom | ( | const ms_umod_specificity * | right | ) |
Copies all content from another instance.
right | another 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 deleteNeutralLoss | ( | const int | idx | ) |
Remove a 'NeutralLoss' element from the list in memory.
idx | number of the neutral loss for deletion from 0 to (getNumberOfNeutralLosses() - 1). |
bool deletePepNeutralLoss | ( | const int | idx | ) |
Remove a 'PepNeutralLoss' element object from the list in memory.
idx | number of the peptide neutral loss for deletion from 0 to (getNumberOfPepNeutralLosses() - 1). |
void dropClassification | ( | ) |
Delete the classification
attribute.
Deletes the attribute until is re-set.
void dropHidden | ( | ) |
Delete the hidden
attribute.
Deletes the attribute until is re-set.
void dropMiscNotes | ( | ) |
Delete the misc_notes
element.
Deletes the element until it is re-set.
void dropPosition | ( | ) |
Delete the position
attribute.
Deletes the attribute until is re-set.
void dropSite | ( | ) |
Delete the site
attribute.
Deletes the attribute until is re-set.
void dropSpecGroup | ( | ) |
Delete the spec_group
attribute.
Deletes the attribute until is re-set.
std::string getClassification | ( | ) | const |
Returns the value of the classification
attribute.
std::string getClassificationSchemaType | ( | ) | const |
Obtain a symbolic name for the classification
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getHiddenSchemaType | ( | ) | const |
Obtain a symbolic name for the hidden
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getMiscNotes | ( | ) | const |
Returns the value of the misc_notes
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.
const ms_umod_neutralloss * getNeutralLoss | ( | const int | idx | ) | const |
Returns a read-only pointer to a 'NeutralLoss' element by its number.
idx | number of the neutral loss from 0 to (getNumberOfNeutralLosses() - 1). |
std::string getNeutralLossSchemaType | ( | ) | const |
Obtain a symbolic name for the 'NeutralLoss' element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
int getNumberOfNeutralLosses | ( | ) | const |
Returns the number of 'NeutralLoss' elements currently held in memory.
int getNumberOfPepNeutralLosses | ( | ) | const |
Returns the number of 'PepNeutralLoss' elements currently held in memory.
const ms_umod_neutralloss * getPepNeutralLoss | ( | const int | idx | ) | const |
Returns a read-only pointer to a 'PepNeutralLoss' element object by its number.
idx | number of the peptide neutral loss from 0 to (getNumberOfPepNeutralLosses() - 1). |
std::string getPepNeutralLossSchemaType | ( | ) | const |
Obtain a symbolic name for the 'NeutralLoss' element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getPosition | ( | ) | const |
Returns the value of the position
attribute.
std::string getPositionSchemaType | ( | ) | const |
Obtain a symbolic name for the position
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
|
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.
std::string getSite | ( | ) | const |
Returns the value of the site
attribute.
std::string getSiteSchemaType | ( | ) | const |
Obtain a symbolic name for the site
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
int getSpecGroup | ( | ) | const |
Returns the value of the spec_group
attribute.
std::string getSpecGroupSchemaType | ( | ) | const |
Obtain a symbolic name for the spec_group
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
bool haveClassification | ( | ) | const |
Indicates presence of the classification
attribute.
bool haveHidden | ( | ) | const |
Indicates presence of the hidden
attribute.
bool haveMiscNotes | ( | ) | const |
Indicates presence of the misc_notes
element.
bool havePosition | ( | ) | const |
Indicates presence of the position
attribute.
bool haveSite | ( | ) | const |
Indicates presence of the site
attribute.
bool haveSpecGroup | ( | ) | const |
Indicates presence of the spec_group
attribute.
bool inErrorTolerant | ( | ) | const |
bool inLongList | ( | ) | const |
Indicates whether this specificity is in the full list on the Mascot search form.
bool inShortList | ( | ) | const |
Indicates whether this specificity is in the short list on the Mascot search form.
bool isHidden | ( | ) | const |
Returns the value of the hidden
attribute.
bool isSameAs | ( | const ms_umod_specificity & | right | ) | const |
Returns true if instances contain the same information.
right | another instance of this class to compare. |
ms_umod_specificity & operator= | ( | const ms_umod_specificity & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setClassification | ( | const char * | value | ) |
Set a custom value for the classification
attribute.
value | a new value for the attribute. |
void setHidden | ( | const bool | value | ) |
Set a custom value for the hidden
attribute.
value | a new value for the attribute. |
void setMiscNotes | ( | const char * | value | ) |
Set a custom value for the misc_notes
element.
value | a new value for the element. |
void setPosition | ( | const char * | value | ) |
Set a custom value for the position
attribute.
value | Position of the specificity that should be one of the Type mqm:positionType values. |
void setSite | ( | const char * | value | ) |
Set a custom value for the site
attribute.
value | that should be one of the Type mqm:siteType values. |
void setSpecGroup | ( | const int | value | ) |
Set a custom value for the spec_group
attribute.
value | a new value for the attribute. |
void showInLongList | ( | bool | b | ) |
b | sets if this specificity is required in the mascot search form full list. |
void showInShortList | ( | bool | b | ) |
b | sets if this specificity is required in the mascot search form short list. |
bool updateNeutralLoss | ( | const int | idx, |
const ms_umod_neutralloss * | nl | ||
) |
Update the information for a particular 'NeutralLoss' element.
idx | number of the neutral loss object for updating from 0 to (getNumberOfNeutralLosses() - 1). |
nl | an object to copy the content from. |
bool updatePepNeutralLoss | ( | const int | idx, |
const ms_umod_neutralloss * | pnl | ||
) |
Update the information for a particular 'PepNeutralLoss' element.
idx | number of the peptide neutral loss object for updating from 0 to (getNumberOfPepNeutralLosses() - 1). |
pnl | an object to copy the content from. |
void useInErrorTolerant | ( | bool | b | ) |
b | sets if this specificity is required in error tolerant searches. |
|
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.
pSchemaFileObj | a valid schema object instance to validate against. |
|
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().
pSchemaFileObj | a valid schema object instance to validate against. |