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

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_correctiongetCorrection (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_indexgetFileIndex (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_isotopegetIsotope (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_modgroupgetModificationGroupByName (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_modgroupgetModificationGroupByNumber (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_moverzgetMoverz () 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_satellitegetSatellite () 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_componentoperator= (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.
 

Detailed Description

An object of this class represent a single component element in quantitation.xml.

Identifies a component used to calculate a ratio.

Constructor & Destructor Documentation

◆ ms_quant_component() [1/2]

Default constructor.

Assigns reasonable default values to all internal members.

◆ ms_quant_component() [2/2]

Copying constructor.

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

Member Function Documentation

◆ appendCorrection()

void appendCorrection ( const ms_quant_correction correction)

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

Parameters
correctionan instance to copy the content into the newly added element from.

◆ appendFileIndex()

void appendFileIndex ( const ms_quant_file_index file_index)

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

Parameters
file_indexa new content for the element.

◆ appendIsotope()

void appendIsotope ( const ms_quant_isotope isotope)

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

Parameters
isotopean instance to copy the content into the newly added element from.

◆ appendModificationGroup()

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.

Parameters
iteman instance of modification group object to copy content from.

◆ clearCorrections()

void clearCorrections ( )

Deletes all correction elements from the list.

Deletes all nested correction elements.

◆ clearFileIndexes()

void clearFileIndexes ( )

Deletes all file_index elements from the list.

Deletes all file_index elements from the list.

◆ copyFrom()

void copyFrom ( const ms_quant_component 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.

◆ deleteCorrection()

bool deleteCorrection ( const int  idx)

Remove a correction element from the list.

Parameters
idxa zero-based index of the element to delete.
Returns
TRUE if the element has been successfully deleted and FALSE otherwise.

◆ deleteFileIndex()

bool deleteFileIndex ( const int  idx)

Remove a single file_index element from the list.

Parameters
idxis the zero based index for the element and should be >=0 and < getNumberOfFileIndexes()
Returns
true if idx >=0 and < getNumberOfFileIndexes()

◆ deleteIsotope()

bool deleteIsotope ( const int  idx)

Remove a isotope element from the list.

Parameters
idxa zero-based index of the element to delete.
Returns
TRUE if the element has been successfully deleted and FALSE otherwise.

◆ deleteModificationGroupByName()

bool deleteModificationGroupByName ( const char *  name)

Remove a modification group from the list in memory by its unique name.

Parameters
namename of the modification group for deletion.
Returns
TRUE if the modification group has been found and successfully deleted and FALSE otherwise.

◆ deleteModificationGroupByNumber()

bool deleteModificationGroupByNumber ( const int  idx)

Remove a modification group from the list in memory by its index.

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

◆ dropFileIndex()

void dropFileIndex ( )

Delete the file_index element.

Deprecated:
After version 2.7.2, multiple file indexes are supported per component

Just calls clearFileIndexes()

◆ dropMoverz()

void dropMoverz ( )

Delete the moverz element.

Deletes the element until it is re-set.

◆ dropName()

void dropName ( )

Delete the name attribute.

Deletes the attribute until it is re-set.

◆ dropSatellite()

void dropSatellite ( )

Delete the satellite element.

Deletes the element until it is re-set.

◆ getCorrection()

const ms_quant_correction * getCorrection ( const int  idx) const

Returns a correction element object by its number.

Parameters
idxa zero-based index of the element to retrieve.
Returns
a read-only pointer to the retrieved element. See Maintaining object references: two rules of thumb.

◆ getCorrectionSchemaType()

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.

Returns
symbolic type name for the element.

◆ getFileIndex() [1/2]

int getFileIndex ( ) const

Returns the value of the first file_index element.

The file_index element is a data file identifier (replicate).

Deprecated:
After version 2.7.2, multiple file indexes are supported per component and this just returns the first one.

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

Returns
current element content.

◆ getFileIndex() [2/2]

const ms_quant_file_index * getFileIndex ( const int  idx) const

Returns a file_index element object by its number.

Parameters
idxa zero-based index of the element to retrieve.
Returns
a read-only pointer to the retrieved element. See Maintaining object references: two rules of thumb.

◆ getFileIndexSchemaType()

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.

Returns
symbolic type name for the element.

◆ getIsotope()

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.

Parameters
idxa zero-based index of the element to retrieve.
Returns
a read-only pointer to the retrieved element. See Maintaining object references: two rules of thumb.

◆ getIsotopeSchemaType()

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.

Returns
symbolic type name for the element.

◆ getModificationGroupByName()

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.

Parameters
namename of the modification group to find.
Returns
a read-only pointer to a modification group object. See Maintaining object references: two rules of thumb.

◆ getModificationGroupByNumber()

const ms_quant_modgroup * getModificationGroupByNumber ( const int  idx) const

Returns a modification group object by its number.

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

◆ getModificationGroupSchemaType()

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.

Returns
symbolic type name for the element.

◆ getMoverz()

const ms_quant_moverz * getMoverz ( ) const

Returns the value of the moverz element.

Returns
a read-only pointer to an object with the current element content. See Maintaining object references: two rules of thumb.

◆ getMoverzSchemaType()

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.

Returns
symbolic type name for the element.

◆ getName()

std::string getName ( ) const

Returns the value of the name attribute.

Returns
a descriptive name that will appear in drop down lists, etc.

◆ getNameSchemaType()

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.

Returns
symbolic type name for the element.

◆ getNumberOfCorrections()

int getNumberOfCorrections ( ) const

Returns the number of correction elements held.

Returns
total number of correction elements held.

◆ getNumberOfFileIndexes()

int getNumberOfFileIndexes ( ) const

Returns the number of file_index elements held.

Returns
the number of file index / fraction pairs found

◆ getNumberOfIsotopes()

int getNumberOfIsotopes ( ) const

Returns the number of isotope elements held.

Returns
total number of isotope elements held.

◆ getNumberOfModificationGroups()

int getNumberOfModificationGroups ( ) const

Returns the number of nested modification groups.

Returns
total number of nested modification groups.

◆ getSatellite()

const ms_quant_satellite * getSatellite ( ) const

Returns the value of the satellite element.

Returns
a read-only pointer to an object with the current element content. See Maintaining object references: two rules of thumb.

◆ getSatelliteSchemaType()

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.

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")

◆ haveFileIndex()

bool haveFileIndex ( ) const

Check for presence of one or more file_index element.

Deprecated:
After version 2.7.2, multiple file indexes are supported per component

Use getNumberOfFileIndexes()

Returns
TRUE if the element is present and FALSE otherwise.

◆ haveMoverz()

bool haveMoverz ( ) const

Check for presence of the moverz element.

Returns
TRUE if the element is present and FALSE otherwise.

◆ haveName()

bool haveName ( ) const

Check for presence of the name attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveSatellite()

bool haveSatellite ( ) const

Check for presence of the satellite element.

Returns
TRUE if the element is present and FALSE otherwise.

◆ operator=()

ms_quant_component & operator= ( const ms_quant_component right)

C++ style assignment operator.

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

◆ setFileIndex()

void setFileIndex ( const int  file_index)

Supply a custom content for the first file_index element.

Deprecated:
After version 2.7.2, multiple file indexes are supported per component and this just sets the first one.

Call appendFileIndex() or updateFileIndex() to set a file_index

Parameters
file_indexa new content for the element.

◆ setMoverz()

void setMoverz ( const ms_quant_moverz moverz)

Supply a custom content for the moverz element.

Parameters
moverza new content for the element.

◆ setName()

void setName ( const char *  value)

Set a custom value for the name attribute.

Parameters
valuea new value for the attribute.

◆ setSatellite()

void setSatellite ( const ms_quant_satellite satellite)

Supply a custom content for the satellite element.

Parameters
satellitea new content for the element.

◆ updateCorrection()

bool updateCorrection ( const int  idx,
const ms_quant_correction correction 
)

Update the information for a specific correction element.

Parameters
idxa zero-based index of the element to update.
correctionan instance to copy the content from.
Returns
TRUE if the element has been successfully updated and FALSE otherwise.

◆ updateFileIndex()

bool updateFileIndex ( const int  idx,
const ms_quant_file_index file_index 
)

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

Parameters
idxis the zero based index for the element and should be >= 0 and < getNumberOfFileIndexes()
file_indexa new content for the element.
Returns
true if idx >= 0 and < getNumberOfFileIndexes()

◆ updateIsotope()

bool updateIsotope ( const int  idx,
const ms_quant_isotope isotope 
)

Update the information for a specific isotope element.

Parameters
idxa zero-based index of the element to update.
isotopean instance to copy the content from.
Returns
TRUE if the element has been successfully updated and FALSE otherwise.

◆ updateModificationGroupByName()

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.

Parameters
namename of the modification group for updating.
modgroupan object to copy the content from.
Returns
TRUE if the modification group has been found and successfully updated and FALSE otherwise.

◆ updateModificationGroupByNumber()

bool updateModificationGroupByNumber ( const int  idx,
const ms_quant_modgroup modgroup 
)

Update the information for a specific modification group refering to it by its index.

Parameters
idxnumber of the modification group for updating from 0 to (getNumberOfModificationGroups() - 1).
modgroupan object to copy the content from.
Returns
TRUE if the modification group 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: