An object of this class represent a single component element in quantitation.xml
.
More...
#include <ms_quant_component.hpp>
Inherits ms_xml_IValidatable.
Public Member Functions | |
ms_quant_component () | |
Default constructor. | |
ms_quant_component (const ms_quant_component &src) | |
Copying constructor. | |
virtual | ~ms_quant_component () |
Destructor. | |
void | appendCorrection (const ms_quant_correction *correction) |
Adds a new correction element at the end of the list. | |
void | appendFileIndex (const ms_quant_file_index *file_index) |
Adds a new correction element at the end of the list. | |
void | appendIsotope (const ms_quant_isotope *isotope) |
Adds a new isotope element at the end of the list. | |
void | appendModificationGroup (const ms_quant_modgroup *item) |
Adds a new modification group at the end of the list. | |
void | clearCorrections () |
Deletes all correction elements from the list. | |
void | clearFileIndexes () |
Deletes all file_index elements from the list. | |
void | clearIsotopes () |
Deletes all isotope elements from the list. | |
void | clearModificationGroups () |
Deletes all modification groups from the list. | |
void | copyFrom (const ms_quant_component *right) |
Copies all content from another instance. | |
void | defaultValues () |
Call this member if you want to start again. | |
bool | deleteCorrection (const int idx) |
Remove a correction element from the list. | |
bool | deleteFileIndex (const int idx) |
Remove a single file_index element from the list. | |
bool | deleteIsotope (const int idx) |
Remove a isotope element from the list. | |
bool | deleteModificationGroupByName (const char *name) |
Remove a modification group from the list in memory by its unique name. | |
bool | deleteModificationGroupByNumber (const int idx) |
Remove a modification group from the list in memory by its index. | |
void | dropFileIndex () |
Delete the file_index element. | |
void | dropMoverz () |
Delete the moverz element. | |
void | dropName () |
Delete the name attribute. | |
void | dropSatellite () |
Delete the satellite element. | |
const ms_quant_correction * | getCorrection (const int idx) const |
Returns a correction element object by its number. | |
std::string | getCorrectionSchemaType () const |
Obtain a symbolic name for the correction element schema type. | |
int | getFileIndex () const |
Returns the value of the first file_index element. | |
const ms_quant_file_index * | getFileIndex (const int idx) const |
Returns a file_index element object by its number. | |
std::string | getFileIndexSchemaType () const |
Obtain a symbolic name for the file_index element schema type. | |
const ms_quant_isotope * | getIsotope (const int idx) const |
Returns a isotope element object by its number. | |
std::string | getIsotopeSchemaType () const |
Obtain a symbolic name for the isotope element schema type. | |
const ms_quant_modgroup * | getModificationGroupByName (const char *name) const |
Returns a modification group object by its name or a null value in case it is not found. | |
const ms_quant_modgroup * | getModificationGroupByNumber (const int idx) const |
Returns a modification group object by its number. | |
std::string | getModificationGroupSchemaType () const |
Obtain a symbolic name for the modification_group element schema type. | |
const ms_quant_moverz * | getMoverz () const |
Returns the value of the moverz element. | |
std::string | getMoverzSchemaType () const |
Obtain a symbolic name for the moverz 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 | getNumberOfCorrections () const |
Returns the number of correction elements held. | |
int | getNumberOfFileIndexes () const |
Returns the number of file_index elements held. | |
int | getNumberOfIsotopes () const |
Returns the number of isotope elements held. | |
int | getNumberOfModificationGroups () const |
Returns the number of nested modification groups. | |
const ms_quant_satellite * | getSatellite () const |
Returns the value of the satellite element. | |
std::string | getSatelliteSchemaType () const |
Obtain a symbolic name for the satellite element schema type. | |
virtual std::string | getSchemaType () const |
Returns name of the schema type that can be used to validate this element. | |
bool | haveFileIndex () const |
Check for presence of one or more file_index element. | |
bool | haveMoverz () const |
Check for presence of the moverz element. | |
bool | haveName () const |
Check for presence of the name attribute. | |
bool | haveSatellite () const |
Check for presence of the satellite element. | |
ms_quant_component & | operator= (const ms_quant_component &right) |
C++ style assignment operator. | |
void | setFileIndex (const int file_index) |
Supply a custom content for the first file_index element. | |
void | setMoverz (const ms_quant_moverz *moverz) |
Supply a custom content for the moverz element. | |
void | setName (const char *value) |
Set a custom value for the name attribute. | |
void | setSatellite (const ms_quant_satellite *satellite) |
Supply a custom content for the satellite element. | |
bool | updateCorrection (const int idx, const ms_quant_correction *isotope) |
Update the information for a specific correction element. | |
bool | updateFileIndex (const int idx, const ms_quant_file_index *file_index) |
Adds a new correction element at the end of the list. | |
bool | updateIsotope (const int idx, const ms_quant_isotope *isotope) |
Update the information for a specific isotope element. | |
bool | updateModificationGroupByName (const char *name, const ms_quant_modgroup *modgroup) |
Update the information for a specific modification group refering to it by its unique name. | |
bool | updateModificationGroupByNumber (const int idx, const ms_quant_modgroup *modgroup) |
Update the information for a specific modification group refering to it by its index. | |
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 component element in quantitation.xml
.
Identifies a component used to calculate a ratio.
Default constructor.
Assigns reasonable default values to all internal members.
ms_quant_component | ( | const ms_quant_component & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
void appendCorrection | ( | const ms_quant_correction * | correction | ) |
Adds a new correction
element at the end of the list.
correction | an instance to copy the content into the newly added element from. |
void appendFileIndex | ( | const ms_quant_file_index * | file_index | ) |
Adds a new correction
element at the end of the list.
file_index | a new content for the element. |
void appendIsotope | ( | const ms_quant_isotope * | isotope | ) |
Adds a new isotope
element at the end of the list.
isotope | an instance to copy the content into the newly added element from. |
void appendModificationGroup | ( | const ms_quant_modgroup * | item | ) |
Adds a new modification group at the end of the list.
Creates a new modification group object, copies all content from the object supplied as a parameter and adds it at the end of the methods list.
item | an instance of modification group object to copy content from. |
void clearCorrections | ( | ) |
Deletes all correction
elements from the list.
Deletes all nested correction
elements.
void clearFileIndexes | ( | ) |
Deletes all file_index
elements from the list.
Deletes all file_index
elements from the list.
void copyFrom | ( | const ms_quant_component * | 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 deleteCorrection | ( | const int | idx | ) |
Remove a correction
element from the list.
idx | a zero-based index of the element to delete. |
bool deleteFileIndex | ( | const int | idx | ) |
Remove a single file_index
element from the list.
idx | is the zero based index for the element and should be >=0 and < getNumberOfFileIndexes() |
bool deleteIsotope | ( | const int | idx | ) |
Remove a isotope
element from the list.
idx | a zero-based index of the element to delete. |
bool deleteModificationGroupByName | ( | const char * | name | ) |
Remove a modification group from the list in memory by its unique name.
name | name of the modification group for deletion. |
bool deleteModificationGroupByNumber | ( | const int | idx | ) |
Remove a modification group from the list in memory by its index.
idx | number of the modification group for deletion from 0 to (getNumberOfModificationGroups() - 1). |
void dropFileIndex | ( | ) |
Delete the file_index
element.
Just calls clearFileIndexes()
void dropMoverz | ( | ) |
Delete the moverz
element.
Deletes the element until it is re-set.
void dropName | ( | ) |
Delete the name
attribute.
Deletes the attribute until it is re-set.
void dropSatellite | ( | ) |
Delete the satellite
element.
Deletes the element until it is re-set.
const ms_quant_correction * getCorrection | ( | const int | idx | ) | const |
Returns a correction
element object by its number.
idx | a zero-based index of the element to retrieve. |
std::string getCorrectionSchemaType | ( | ) | const |
Obtain a symbolic name for the correction
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
int getFileIndex | ( | ) | const |
Returns the value of the first file_index
element.
The file_index
element is a data file identifier (replicate).
Call getNumberOfFileIndexes() and for each one call getFileIndex(const int idx) to return a matrix_science::ms_quant_file_index * and then call ms_quant_file_index::getContent() to retrieve the the file index
const ms_quant_file_index * getFileIndex | ( | const int | idx | ) | const |
Returns a file_index
element object by its number.
idx | a zero-based index of the element to retrieve. |
std::string getFileIndexSchemaType | ( | ) | const |
Obtain a symbolic name for the file_index
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_isotope * getIsotope | ( | const int | idx | ) | const |
Returns a isotope
element object by its number.
Element for non-SILAC metabolic labelling. Applies to residues only.
idx | a zero-based index of the element to retrieve. |
std::string getIsotopeSchemaType | ( | ) | const |
Obtain a symbolic name for the isotope
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_modgroup * getModificationGroupByName | ( | const char * | name | ) | const |
Returns a modification group object by its name or a null value in case it is not found.
name | name of the modification group to find. |
const ms_quant_modgroup * getModificationGroupByNumber | ( | const int | idx | ) | const |
Returns a modification group object by its number.
idx | number of the modification group from 0 to (getNumberOfModificationGroups() - 1). |
std::string getModificationGroupSchemaType | ( | ) | const |
Obtain a symbolic name for the modification_group
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_moverz * getMoverz | ( | ) | const |
Returns the value of the moverz
element.
std::string getMoverzSchemaType | ( | ) | const |
Obtain a symbolic name for the moverz
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 getNumberOfCorrections | ( | ) | const |
Returns the number of correction
elements held.
correction
elements held. int getNumberOfFileIndexes | ( | ) | const |
Returns the number of file_index
elements held.
int getNumberOfIsotopes | ( | ) | const |
Returns the number of isotope
elements held.
isotope
elements held. int getNumberOfModificationGroups | ( | ) | const |
Returns the number of nested modification groups.
const ms_quant_satellite * getSatellite | ( | ) | const |
Returns the value of the satellite
element.
std::string getSatelliteSchemaType | ( | ) | const |
Obtain a symbolic name for the satellite
element 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.
bool haveFileIndex | ( | ) | const |
Check for presence of one or more file_index
element.
bool haveMoverz | ( | ) | const |
Check for presence of the moverz
element.
bool haveName | ( | ) | const |
Check for presence of the name
attribute.
bool haveSatellite | ( | ) | const |
Check for presence of the satellite
element.
ms_quant_component & operator= | ( | const ms_quant_component & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setFileIndex | ( | const int | file_index | ) |
Supply a custom content for the first file_index
element.
Call appendFileIndex() or updateFileIndex() to set a file_index
file_index | a new content for the element. |
void setMoverz | ( | const ms_quant_moverz * | moverz | ) |
Supply a custom content for the moverz
element.
moverz | a new content for the element. |
void setName | ( | const char * | value | ) |
Set a custom value for the name
attribute.
value | a new value for the attribute. |
void setSatellite | ( | const ms_quant_satellite * | satellite | ) |
Supply a custom content for the satellite
element.
satellite | a new content for the element. |
bool updateCorrection | ( | const int | idx, |
const ms_quant_correction * | correction | ||
) |
Update the information for a specific correction
element.
idx | a zero-based index of the element to update. |
correction | an instance to copy the content from. |
bool updateFileIndex | ( | const int | idx, |
const ms_quant_file_index * | file_index | ||
) |
Adds a new correction
element at the end of the list.
idx | is the zero based index for the element and should be >= 0 and < getNumberOfFileIndexes() |
file_index | a new content for the element. |
bool updateIsotope | ( | const int | idx, |
const ms_quant_isotope * | isotope | ||
) |
Update the information for a specific isotope
element.
idx | a zero-based index of the element to update. |
isotope | an instance to copy the content from. |
bool updateModificationGroupByName | ( | const char * | name, |
const ms_quant_modgroup * | modgroup | ||
) |
Update the information for a specific modification group refering to it by its unique name.
name | name of the modification group for updating. |
modgroup | an object to copy the content from. |
bool updateModificationGroupByNumber | ( | const int | idx, |
const ms_quant_modgroup * | modgroup | ||
) |
Update the information for a specific modification group refering to it by its index.
idx | number of the modification group for updating from 0 to (getNumberOfModificationGroups() - 1). |
modgroup | an object 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. |