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

Service for managing datasets and methodologies. More...

#include <dataset_service.hpp>

Collaboration diagram for dataset_service:
Collaboration graph

Public Types

using context = ores::database::context
 

Public Member Functions

 dataset_service (context ctx)
 Constructs a dataset_service with required repositories.
 
std::vector< domain::datasetlist_datasets ()
 Lists all datasets.
 
std::vector< domain::datasetlist_datasets (std::uint32_t offset, std::uint32_t limit)
 Lists datasets with pagination.
 
std::uint32_t get_dataset_count ()
 Gets the total count of active datasets.
 
std::optional< domain::datasetfind_dataset (const boost::uuids::uuid &id)
 Finds a dataset by its ID.
 
void save_dataset (const domain::dataset &dataset)
 Saves a dataset (creates or updates).
 
void remove_dataset (const boost::uuids::uuid &id)
 Removes a dataset.
 
std::vector< domain::datasetget_dataset_history (const boost::uuids::uuid &id)
 Gets the version history for a dataset.
 
std::vector< domain::methodologylist_methodologies ()
 Lists all methodologies.
 
std::vector< domain::methodologylist_methodologies (std::uint32_t offset, std::uint32_t limit)
 Lists methodologies with pagination.
 
std::uint32_t get_methodology_count ()
 Gets the total count of active methodologies.
 
std::optional< domain::methodologyfind_methodology (const boost::uuids::uuid &id)
 Finds a methodology by its ID.
 
void save_methodology (const domain::methodology &methodology)
 Saves a methodology (creates or updates).
 
void remove_methodology (const boost::uuids::uuid &id)
 Removes a methodology.
 
std::vector< domain::methodologyget_methodology_history (const boost::uuids::uuid &id)
 Gets the version history for a methodology.
 

Detailed Description

Service for managing datasets and methodologies.

This service provides functionality for:

Constructor & Destructor Documentation

◆ dataset_service()

dataset_service ( context  ctx)
explicit

Constructs a dataset_service with required repositories.

Parameters
ctxThe database context.

Member Function Documentation

◆ save_dataset()

void save_dataset ( const domain::dataset dataset)

Saves a dataset (creates or updates).

Parameters
datasetThe dataset to save

◆ remove_dataset()

void remove_dataset ( const boost::uuids::uuid &  id)

Removes a dataset.

Parameters
idThe ID of the dataset to remove

◆ get_dataset_history()

std::vector< domain::dataset > get_dataset_history ( const boost::uuids::uuid &  id)

Gets the version history for a dataset.

Parameters
idThe dataset ID
Returns
Vector of all versions, newest first

◆ save_methodology()

void save_methodology ( const domain::methodology methodology)

Saves a methodology (creates or updates).

Parameters
methodologyThe methodology to save

◆ remove_methodology()

void remove_methodology ( const boost::uuids::uuid &  id)

Removes a methodology.

Parameters
idThe ID of the methodology to remove

◆ get_methodology_history()

std::vector< domain::methodology > get_methodology_history ( const boost::uuids::uuid &  id)

Gets the version history for a methodology.

Parameters
idThe methodology ID
Returns
Vector of all versions, newest first