An object of this class represent a single modification group element in quantitation.xml
.
More...
#include <ms_quant_modgroup.hpp>
Inherits ms_xml_IValidatable.
Public Member Functions | |
ms_quant_modgroup () | |
Default constructor. | |
ms_quant_modgroup (const ms_quant_modgroup &src) | |
Copying constructor. | |
virtual | ~ms_quant_modgroup () |
Destructor. | |
void | appendLocalDefinition (const ms_quant_localdef *localdef) |
Adds a new local_definition element at the end of the list. | |
void | appendModFile (const char *mod) |
Adds a new mod_file at the end of the list. | |
void | appendUnmodified (const ms_quant_unmodified *unmodified) |
Adds a new unmodified element at the end of the list. | |
void | clearLocalDefinitions () |
Deletes all local_definition elements from the list. | |
void | clearModFiles () |
Deletes all mod_file elements from the list. | |
void | clearUnmodified () |
Deletes all unmodified elements from the list. | |
void | copyFrom (const ms_quant_modgroup *right) |
Copies all content from another instance. | |
void | defaultValues () |
Call this member if you want to start again. | |
bool | deleteLocalDefinition (const int idx) |
Removes a local_definition element from the list. | |
bool | deleteModFile (const int idx) |
Removes mod_file element from the list. | |
bool | deleteUnmodified (const int idx) |
Removes an unmodified element from the list. | |
void | dropMode () |
Delete the mode attribute. | |
void | dropName () |
Delete the name attribute. | |
void | dropRequired () |
Delete the required attribute. | |
int | findModFile (const char *mod) const |
Return zero-based index of a mod_file if it is found in the list, -1 otherwise. | |
const ms_quant_localdef * | getLocalDefinition (const int idx) const |
Returns a local_definition element object by its number. | |
std::string | getLocalDefinitionSchemaType () const |
Obtain a symbolic name for the local_definition element schema type. | |
std::string | getMode () const |
Returns the value of the mode attribute. | |
std::string | getModeSchemaType () const |
Obtain a symbolic name for the mode attribute schema type. | |
std::string | getModFile (const int idx) const |
Returns mod_file element content by its number. | |
std::string | getModFileSchemaType () const |
Obtain a symbolic name for the mod_file element schema type. | |
std::string | getName () const |
Returns the value of the name attribute. | |
std::string | getNameSchemaType () const |
Obtain a symbolic name for the name attribute schema type. | |
int | getNumberOfLocalDefinitions () const |
Returns the number of nested local_definition elements. | |
int | getNumberOfModFiles () const |
Returns the number of nested mod_file elements. | |
int | getNumberOfUnmodified () const |
Returns the number of nested unmodified elements. | |
std::string | getRequiredSchemaType () const |
Obtain a symbolic name for the required attribute schema type. | |
virtual std::string | getSchemaType () const |
Returns name of the schema type that can be used to validate this element. | |
const ms_quant_unmodified * | getUnmodified (const int idx) const |
Returns an unmodified element object by its number. | |
std::string | getUnmodifiedSchemaType () const |
Obtain a symbolic name for the unmodified element schema type. | |
bool | haveMode () const |
Indicates presence of the mode attribute. | |
bool | haveName () const |
Check for presence of the name attribute. | |
bool | haveRequired () const |
Indicates presence of the required attribute. | |
bool | isRequired () const |
Returns the value of the required attribute. | |
ms_quant_modgroup & | operator= (const ms_quant_modgroup &right) |
C++ style assignment operator. | |
void | setMode (const char *value) |
Set a custom value for the mode attribute. | |
void | setName (const char *value) |
Set a custom value for the name attribute. | |
void | setRequired (bool value) |
Set a custom value for the required attribute. | |
bool | updateLocalDefinition (const int idx, const ms_quant_localdef *localdef) |
Supply new content for one of the local_definition elements in the list. | |
bool | updateUnmodified (const int idx, const ms_quant_unmodified *unmodified) |
Supply new content for one of the unmodified elements in the list. | |
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. | |
An object of this class represent a single modification group element in quantitation.xml
.
Grouping to enable mode constraint (e.g. exclusive) to apply to a set of modifications.
Default constructor.
Assigns reasonable default values to all internal members.
ms_quant_modgroup | ( | const ms_quant_modgroup & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
void appendLocalDefinition | ( | const ms_quant_localdef * | localdef | ) |
Adds a new local_definition
element at the end of the list.
localdef | a new element to be added to the list. |
void appendModFile | ( | const char * | mod | ) |
Adds a new mod_file
at the end of the list.
mod | a title from the Mascot mod_file . |
void appendUnmodified | ( | const ms_quant_unmodified * | unmodified | ) |
Adds a new unmodified
element at the end of the list.
unmodified | a new element to be added to the list. |
void copyFrom | ( | const ms_quant_modgroup * | 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 deleteLocalDefinition | ( | const int | idx | ) |
Removes a local_definition
element from the list.
idx | a zero based index of the local_definition element to delete from the list. |
bool deleteModFile | ( | const int | idx | ) |
Removes mod_file
element from the list.
idx | zero based index of the element to remove. |
bool deleteUnmodified | ( | const int | idx | ) |
Removes an unmodified
element from the list.
idx | a zero based index of the unmodified element to delete from the list. |
void dropMode | ( | ) |
Delete the mode
attribute.
Disables the attribute until it is re-set.
void dropName | ( | ) |
Delete the name
attribute.
Deletes the attribute until it is re-set.
void dropRequired | ( | ) |
Delete the required
attribute.
Disables the attribute until it is re-set.
int findModFile | ( | const char * | mod | ) | const |
Return zero-based index of a mod_file if it is found in the list, -1 otherwise.
mod | a title from the Mascot mod_file . |
mod_file
if it is found in the list, otherwise -1. const ms_quant_localdef * getLocalDefinition | ( | const int | idx | ) | const |
Returns a local_definition
element object by its number.
idx | a zero based index of the element to retrieve. |
std::string getLocalDefinitionSchemaType | ( | ) | const |
Obtain a symbolic name for the local_definition
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getMode | ( | ) | const |
Returns the value of the mode
attribute.
"Mode" is one of fixed, variable or exclusive. Applies to all the modifications in the group.
mode
attribute. std::string getModeSchemaType | ( | ) | const |
Obtain a symbolic name for the mode
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getModFile | ( | const int | idx | ) | const |
Returns mod_file
element content by its number.
idx | zero based index of the mod_file element. |
mod_file
element content. std::string getModFileSchemaType | ( | ) | const |
Obtain a symbolic name for the mod_file
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getName | ( | ) | const |
Returns the value of the name
attribute.
std::string getNameSchemaType | ( | ) | const |
Obtain a symbolic name for the name
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
int getNumberOfLocalDefinitions | ( | ) | const |
Returns the number of nested local_definition
elements.
local_definition
elements. int getNumberOfModFiles | ( | ) | const |
Returns the number of nested mod_file
elements.
mod_file
elements. int getNumberOfUnmodified | ( | ) | const |
Returns the number of nested unmodified
elements.
unmodified
elements. std::string getRequiredSchemaType | ( | ) | const |
Obtain a symbolic name for the required
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.
const ms_quant_unmodified * getUnmodified | ( | const int | idx | ) | const |
Returns an unmodified
element object by its number.
idx | a zero based index of the element to retrieve. |
std::string getUnmodifiedSchemaType | ( | ) | const |
Obtain a symbolic name for the unmodified
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
bool haveMode | ( | ) | const |
Indicates presence of the mode
attribute.
You should always check for the presence of an attribute before retrieving its actual value.
bool haveName | ( | ) | const |
Check for presence of the name
attribute.
bool haveRequired | ( | ) | const |
Indicates presence of the required
attribute.
You should always check for the presence of an attribute before retrieving its actual value.
bool isRequired | ( | ) | const |
Returns the value of the required
attribute.
Modification required for a peptide to be part of a component. Does not affect the Mascot search.
required
attribute. ms_quant_modgroup & operator= | ( | const ms_quant_modgroup & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setMode | ( | const char * | value | ) |
Set a custom value for the mode
attribute.
An attribute becomes present after it is value has been set at least once. To disable it again call dropMode().
value | a new value for the attribute. |
void setName | ( | const char * | value | ) |
Set a custom value for the name
attribute.
value | a new value for the attribute. |
void setRequired | ( | bool | value | ) |
Set a custom value for the required
attribute.
An attribute becomes present after it is value has been set at least once. To disable it again call dropRequired().
value | a new value for the attribute. |
bool updateLocalDefinition | ( | const int | idx, |
const ms_quant_localdef * | localdef | ||
) |
Supply new content for one of the local_definition
elements in the list.
idx | a zero based index of the element to update. |
localdef | a source to copy the content from. |
bool updateUnmodified | ( | const int | idx, |
const ms_quant_unmodified * | unmodified | ||
) |
Supply new content for one of the unmodified
elements in the list.
idx | a zero based index of the element to update. |
unmodified | a source to copy the content from. |
|
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. |