ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
coding_scheme_service Class Reference

Service for managing coding schemes. More...

#include <coding_scheme_service.hpp>

Collaboration diagram for coding_scheme_service:
Collaboration graph

Public Types

using context = ores::database::context
 

Public Member Functions

 coding_scheme_service (context ctx)
 Constructs a coding_scheme_service with required repositories.
 
std::vector< domain::coding_schemelist_coding_schemes ()
 Lists all coding schemes.
 
std::vector< domain::coding_schemelist_coding_schemes (std::uint32_t offset, std::uint32_t limit)
 Lists coding schemes with pagination.
 
std::vector< domain::coding_schemelist_coding_schemes_by_authority_type (const std::string &authority_type)
 Lists coding schemes for a specific authority type.
 
std::uint32_t get_coding_scheme_count ()
 Gets the total count of active coding schemes.
 
std::optional< domain::coding_schemefind_coding_scheme (const std::string &code)
 Finds a coding scheme by its code.
 
void save_coding_scheme (const domain::coding_scheme &scheme)
 Saves a coding scheme (creates or updates).
 
void remove_coding_scheme (const std::string &code)
 Removes a coding scheme.
 
std::vector< domain::coding_schemeget_coding_scheme_history (const std::string &code)
 Gets the version history for a coding scheme.
 
std::vector< domain::coding_scheme_authority_typelist_authority_types ()
 Lists all coding scheme authority types.
 
std::optional< domain::coding_scheme_authority_typefind_authority_type (const std::string &code)
 Finds a coding scheme authority type by its code.
 
void save_authority_type (const domain::coding_scheme_authority_type &authority_type)
 Saves a coding scheme authority type (creates or updates).
 
void remove_authority_type (const std::string &code)
 Removes a coding scheme authority type.
 
std::vector< domain::coding_scheme_authority_typeget_authority_type_history (const std::string &code)
 Gets the version history for a coding scheme authority type.
 

Detailed Description

Service for managing coding schemes.

This service provides functionality for:

Constructor & Destructor Documentation

◆ coding_scheme_service()

coding_scheme_service ( context  ctx)
explicit

Constructs a coding_scheme_service with required repositories.

Parameters
ctxThe database context.

Member Function Documentation

◆ save_coding_scheme()

void save_coding_scheme ( const domain::coding_scheme scheme)

Saves a coding scheme (creates or updates).

Parameters
schemeThe coding scheme to save

◆ remove_coding_scheme()

void remove_coding_scheme ( const std::string &  code)

Removes a coding scheme.

Parameters
codeThe code of the coding scheme to remove

◆ get_coding_scheme_history()

std::vector< domain::coding_scheme > get_coding_scheme_history ( const std::string &  code)

Gets the version history for a coding scheme.

Parameters
codeThe coding scheme code
Returns
Vector of all versions, newest first

◆ save_authority_type()

void save_authority_type ( const domain::coding_scheme_authority_type authority_type)

Saves a coding scheme authority type (creates or updates).

Parameters
authority_typeThe authority type to save

◆ remove_authority_type()

void remove_authority_type ( const std::string &  code)

Removes a coding scheme authority type.

Parameters
codeThe code of the authority type to remove

◆ get_authority_type_history()

std::vector< domain::coding_scheme_authority_type > get_authority_type_history ( const std::string &  code)

Gets the version history for a coding scheme authority type.

Parameters
codeThe authority type code
Returns
Vector of all versions, newest first