An object of this class represent a protocol
element in quantitation.xml
.
More...
#include <ms_quant_protocol.hpp>
Inherits ms_xml_IValidatable.
Public Member Functions | |
ms_quant_protocol () | |
Default constructor. | |
ms_quant_protocol (const ms_quant_protocol &src) | |
Copying constructor. | |
virtual | ~ms_quant_protocol () |
Destructor. | |
void | copyFrom (const ms_quant_protocol *right) |
Copies all content from another instance. | |
void | defaultValues () |
Call this member if you want to start again. | |
const ms_quant_average * | getAverage () const |
Returns the average element or a null value if not available. | |
std::string | getAverageSchemaType () const |
Obtain a symbolic name for the average element schema type. | |
const ms_quant_multiplex * | getMultiplex () const |
Returns the multiplex element or a null value if not available. | |
std::string | getMultiplexSchemaType () const |
Obtain a symbolic name for the multiplex element schema type. | |
const ms_quant_precursor * | getPrecursor () const |
Returns the precursor element or a null value if not available. | |
std::string | getPrecursorSchemaType () const |
Obtain a symbolic name for the precursor element schema type. | |
const ms_quant_replicate * | getReplicate () const |
Returns the replicate element or a null value if not available. | |
std::string | getReplicateSchemaType () const |
Obtain a symbolic name for the replicate element schema type. | |
const ms_quant_reporter * | getReporter () const |
Returns the reporter element or a null value if not available. | |
std::string | getReporterSchemaType () const |
Obtain a symbolic name for the reporter element schema type. | |
virtual std::string | getSchemaType () const |
Returns name of the schema type that can be used to validate this element. | |
std::string | getType () const |
Call this method first to determine which sub element to retrieve. | |
ms_quant_protocol & | operator= (const ms_quant_protocol &right) |
C++ style assignment operator. | |
void | setAverage (const ms_quant_average *average) |
Override content with another average element. | |
void | setMultiplex (const ms_quant_multiplex *multiplex) |
Override content with another multiplex element. | |
void | setNull () |
Sets content of the protocol element to a null value and deletes all previously held information. | |
void | setPrecursor (const ms_quant_precursor *precursor) |
Override content with another precursor element. | |
void | setReplicate (const ms_quant_replicate *replicate) |
Override content with another replicate element. | |
void | setReporter (const ms_quant_reporter *reporter) |
Override content with another reporter 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. | |
An object of this class represent a protocol
element in quantitation.xml
.
6 different protocols are currently supported, and an object of this class is a container for exactly one of those protocols. The getType() function returns a string which contains the protocol for the current quantitation method. Use the return value from it to determine which of the functions to call to get further protocol details.
ms_quant_protocol | ( | const ms_quant_protocol & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
void copyFrom | ( | const ms_quant_protocol * | 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.
const ms_quant_average * getAverage | ( | ) | const |
Returns the average
element or a null value if not available.
Call this method only if getType() returns average.
average
element object. See Maintaining object references: two rules of thumb. std::string getAverageSchemaType | ( | ) | const |
Obtain a symbolic name for the average
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_multiplex * getMultiplex | ( | ) | const |
Returns the multiplex
element or a null value if not available.
Call this method only if getType() returns "multiplex".
multiplex
element object. See Maintaining object references: two rules of thumb. std::string getMultiplexSchemaType | ( | ) | const |
Obtain a symbolic name for the multiplex
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_precursor * getPrecursor | ( | ) | const |
Returns the precursor
element or a null value if not available.
Call this method only if getType() returns "precursor".
precursor
element object. See Maintaining object references: two rules of thumb. std::string getPrecursorSchemaType | ( | ) | const |
Obtain a symbolic name for the precursor
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_replicate * getReplicate | ( | ) | const |
Returns the replicate
element or a null value if not available.
Call this method only if getType() returns "replicate".
replicate
element object. See Maintaining object references: two rules of thumb. std::string getReplicateSchemaType | ( | ) | const |
Obtain a symbolic name for the replicate
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_reporter * getReporter | ( | ) | const |
Returns the reporter
element or a null value if not available.
Call this method only if getType() returns "reporter".
reporter
element object. See Maintaining object references: two rules of thumb. std::string getReporterSchemaType | ( | ) | const |
Obtain a symbolic name for the reporter
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.
std::string getType | ( | ) | const |
Call this method first to determine which sub element to retrieve.
This table describes possible return values and which function to then call.
String returned | Function to call required |
---|---|
reporter | getReporter() |
average | getAverage() |
precursor | getPrecursor() |
multiplex | getMultiplex() |
replicate | getReplicate() |
null | Indicates that the object is not initialised |
If, for example, getReporter() is called when the return value from this function is "average", then a null value will be returned.
Calling one of the setXXX()-methods will change the protocol type returned by this method.
ms_quant_protocol & operator= | ( | const ms_quant_protocol & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setAverage | ( | const ms_quant_average * | average | ) |
Override content with another average
element.
Calling this method with a null value as a parameter will set the protocol type to "null".
average | a new value for the average element. |
void setMultiplex | ( | const ms_quant_multiplex * | multiplex | ) |
Override content with another multiplex
element.
Calling this method with a null value as a parameter will set the protocol type to "null".
multiplex | a new value for the multiplex element. |
void setNull | ( | ) |
Sets content of the protocol
element to a null value and deletes all previously held information.
Call this to clear the content and set sub-element as "null".
void setPrecursor | ( | const ms_quant_precursor * | precursor | ) |
Override content with another precursor
element.
Calling this method with a null value as a parameter will set the protocol type to "null".
precursor | a new value for the precursor element. |
void setReplicate | ( | const ms_quant_replicate * | replicate | ) |
Override content with another replicate
element.
Calling this method with a null value as a parameter will set the protocol type to "null".
replicate | a new value for the replicate element. |
void setReporter | ( | const ms_quant_reporter * | reporter | ) |
Override content with another reporter
element.
Calling this method with a null value as a parameter will set the protocol type to "null"
reporter | a new value for the reporter element. |
|
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. |