OpenMS
Loading...
Searching...
No Matches
CVMappingRule Class Reference

Representation of a CV Mapping rule used by CVMappings. More...

#include <OpenMS/DATASTRUCTURES/CVMappingRule.h>

Collaboration diagram for CVMappingRule:
[legend]

Public Types

enum  RequirementLevel { MUST = 0 , SHOULD = 1 , MAY = 2 }
 enum to specify the requirement level More...
 
enum  CombinationsLogic { OR = 0 , AND = 1 , XOR = 2 }
 enum to specify the combination operator More...
 

Public Member Functions

 CVMappingRule ()
 Default constructor.
 
 CVMappingRule (const CVMappingRule &rhs)
 Copy constructor.
 
virtual ~CVMappingRule ()
 Destructor.
 
CVMappingRuleoperator= (const CVMappingRule &rhs)
 Assignment operator.
 
Accessors
void setIdentifier (const String &identifier)
 sets the identifier of the rule
 
const StringgetIdentifier () const
 returns the identifier of the rule
 
void setElementPath (const String &element_path)
 sets the path of the element, where this rule is allowed
 
const StringgetElementPath () const
 returns the path of the element, where this rule is allowed
 
void setRequirementLevel (RequirementLevel level)
 sets the requirement level of this rule
 
RequirementLevel getRequirementLevel () const
 returns the requirement level of this rule
 
void setCombinationsLogic (CombinationsLogic combinations_logic)
 sets the combination operator of the rule
 
CombinationsLogic getCombinationsLogic () const
 returns the combinations operator of the rule
 
void setScopePath (const String &path)
 sets the scope path of the rule
 
const StringgetScopePath () const
 returns the scope path of the rule
 
void setCVTerms (const std::vector< CVMappingTerm > &cv_terms)
 sets the terms which are allowed
 
const std::vector< CVMappingTerm > & getCVTerms () const
 returns the allowed terms
 
void addCVTerm (const CVMappingTerm &cv_terms)
 adds a term to the allowed terms
 

Predicates

String identifier_
 
String element_path_
 
RequirementLevel requirement_level_
 
String scope_path_
 
CombinationsLogic combinations_logic_
 
std::vector< CVMappingTermcv_terms_
 
bool operator== (const CVMappingRule &rhs) const
 equality operator
 
bool operator!= (const CVMappingRule &rhs) const
 inequality operator
 

Detailed Description

Representation of a CV Mapping rule used by CVMappings.

Representation of a controlled vocabulary mapping rule.

Member Enumeration Documentation

◆ CombinationsLogic

enum to specify the combination operator

Enumerator
OR 
AND 
XOR 

◆ RequirementLevel

enum to specify the requirement level

Enumerator
MUST 
SHOULD 
MAY 

Constructor & Destructor Documentation

◆ CVMappingRule() [1/2]

Default constructor.

◆ CVMappingRule() [2/2]

CVMappingRule ( const CVMappingRule rhs)

Copy constructor.

◆ ~CVMappingRule()

virtual ~CVMappingRule ( )
virtual

Destructor.

Member Function Documentation

◆ addCVTerm()

void addCVTerm ( const CVMappingTerm cv_terms)

adds a term to the allowed terms

◆ getCombinationsLogic()

CombinationsLogic getCombinationsLogic ( ) const

returns the combinations operator of the rule

◆ getCVTerms()

const std::vector< CVMappingTerm > & getCVTerms ( ) const

returns the allowed terms

◆ getElementPath()

const String & getElementPath ( ) const

returns the path of the element, where this rule is allowed

◆ getIdentifier()

const String & getIdentifier ( ) const

returns the identifier of the rule

◆ getRequirementLevel()

RequirementLevel getRequirementLevel ( ) const

returns the requirement level of this rule

◆ getScopePath()

const String & getScopePath ( ) const

returns the scope path of the rule

◆ operator!=()

bool operator!= ( const CVMappingRule rhs) const

inequality operator

◆ operator=()

CVMappingRule & operator= ( const CVMappingRule rhs)

Assignment operator.

◆ operator==()

bool operator== ( const CVMappingRule rhs) const

equality operator

◆ setCombinationsLogic()

void setCombinationsLogic ( CombinationsLogic  combinations_logic)

sets the combination operator of the rule

◆ setCVTerms()

void setCVTerms ( const std::vector< CVMappingTerm > &  cv_terms)

sets the terms which are allowed

◆ setElementPath()

void setElementPath ( const String element_path)

sets the path of the element, where this rule is allowed

◆ setIdentifier()

void setIdentifier ( const String identifier)

sets the identifier of the rule

◆ setRequirementLevel()

void setRequirementLevel ( RequirementLevel  level)

sets the requirement level of this rule

◆ setScopePath()

void setScopePath ( const String path)

sets the scope path of the rule

Member Data Documentation

◆ combinations_logic_

CombinationsLogic combinations_logic_
protected

◆ cv_terms_

std::vector<CVMappingTerm> cv_terms_
protected

◆ element_path_

String element_path_
protected

◆ identifier_

String identifier_
protected

◆ requirement_level_

RequirementLevel requirement_level_
protected

◆ scope_path_

String scope_path_
protected