OpenMS  2.8.0
Classes | Public Member Functions | List of all members
CVTerm Class Reference

Representation of controlled vocabulary term. More...

#include <OpenMS/METADATA/CVTerm.h>

Collaboration diagram for CVTerm:
[legend]

Classes

struct  Unit
 

Public Member Functions

 CVTerm ()=default
 Default constructor. More...
 
 CVTerm (const String &accession, const String &name="", const String &cv_identifier_ref="", const String &value="", const Unit &unit=Unit())
 Detailed constructor. More...
 
 CVTerm (const CVTerm &)=default
 Copy constructor. More...
 
 CVTerm (CVTerm &&)=default
 Move constructor. More...
 
virtual ~CVTerm ()
 Destructor. More...
 
CVTermoperator= (const CVTerm &)=default
 Assignment operator. More...
 
CVTermoperator= (CVTerm &&) &=default
 Move assignment operator. More...
 
Accessors
void setAccession (const String &accession)
 sets the accession string of the term More...
 
const StringgetAccession () const
 returns the accession string of the term More...
 
void setName (const String &name)
 sets the name of the term More...
 
const StringgetName () const
 returns the name of the term More...
 
void setCVIdentifierRef (const String &cv_identifier_ref)
 sets the cv identifier reference string, e.g. UO for unit obo More...
 
const StringgetCVIdentifierRef () const
 returns the cv identifier reference string More...
 
void setValue (const DataValue &value)
 set the value of the term More...
 
const DataValuegetValue () const
 returns the value of the term More...
 
void setUnit (const Unit &unit)
 sets the unit of the term More...
 
const UnitgetUnit () const
 returns the unit More...
 

Predicates

String accession_
 
String name_
 
String cv_identifier_ref_
 
Unit unit_
 
DataValue value_
 
bool operator== (const CVTerm &rhs) const
 equality operator More...
 
bool operator!= (const CVTerm &rhs) const
 inequality operator More...
 
bool hasValue () const
 checks whether the term has a value More...
 
bool hasUnit () const
 checks whether the term has a unit More...
 

Detailed Description

Representation of controlled vocabulary term.

This class simply stores a CV term, its value and unit if necessary.

Representation of a CV term used by CVMappings

Constructor & Destructor Documentation

◆ CVTerm() [1/4]

CVTerm ( )
default

Default constructor.

◆ CVTerm() [2/4]

CVTerm ( const String accession,
const String name = "",
const String cv_identifier_ref = "",
const String value = "",
const Unit unit = Unit() 
)

Detailed constructor.

◆ CVTerm() [3/4]

CVTerm ( const CVTerm )
default

Copy constructor.

◆ CVTerm() [4/4]

CVTerm ( CVTerm &&  )
default

Move constructor.

◆ ~CVTerm()

virtual ~CVTerm ( )
virtual

Destructor.

Member Function Documentation

◆ getAccession()

const String& getAccession ( ) const

returns the accession string of the term

Referenced by ScoreType::operator<().

◆ getCVIdentifierRef()

const String& getCVIdentifierRef ( ) const

returns the cv identifier reference string

◆ getName()

const String& getName ( ) const

returns the name of the term

Referenced by ScoreType::operator<().

◆ getUnit()

const Unit& getUnit ( ) const

returns the unit

◆ getValue()

const DataValue& getValue ( ) const

returns the value of the term

◆ hasUnit()

bool hasUnit ( ) const

checks whether the term has a unit

◆ hasValue()

bool hasValue ( ) const

checks whether the term has a value

◆ operator!=()

bool operator!= ( const CVTerm rhs) const

inequality operator

◆ operator=() [1/2]

CVTerm& operator= ( const CVTerm )
default

Assignment operator.

◆ operator=() [2/2]

CVTerm& operator= ( CVTerm &&  ) &
default

Move assignment operator.

◆ operator==()

bool operator== ( const CVTerm rhs) const

equality operator

◆ setAccession()

void setAccession ( const String accession)

sets the accession string of the term

◆ setCVIdentifierRef()

void setCVIdentifierRef ( const String cv_identifier_ref)

sets the cv identifier reference string, e.g. UO for unit obo

◆ setName()

void setName ( const String name)

sets the name of the term

Referenced by ScoreType::ScoreType().

◆ setUnit()

void setUnit ( const Unit unit)

sets the unit of the term

◆ setValue()

void setValue ( const DataValue value)

set the value of the term

Member Data Documentation

◆ accession_

String accession_
protected

◆ cv_identifier_ref_

String cv_identifier_ref_
protected

◆ name_

String name_
protected

◆ unit_

Unit unit_
protected

◆ value_

DataValue value_
protected