cppDataPipeline 0.3.0
C++ Implementation of the FAIR Data Pipeline API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
FairDataPipeline::Config Class Reference

class for interacting with confifurations More...

#include <fdp/objects/config.hxx>

Public Types

typedef std::shared_ptr< Configsptr
 
typedef std::map< std::string, IOObjectmap_type
 

Public Member Functions

 ~Config ()
 Destroy the Config object. More...
 
YAML::Node meta_data_ () const
 Returns the meta_data Yaml Node from the config. More...
 
YAML::Node config_writes_ () const
 Returns the writes Yaml Node from the config. More...
 
YAML::Node config_reads_ () const
 Returns the reads Yaml Node from the config. More...
 
bool has_reads () const
 Check whether the config has reads. More...
 
bool has_writes () const
 Check whether the config has writes. More...
 
bool has_outputs () const
 Check whether any outputs have been added. More...
 
bool has_inputs () const
 Check whether any inputs have been added. More...
 
ghc::filesystem::path get_config_file_path () const
 Get the config file path object. More...
 
ghc::filesystem::path get_script_file_path () const
 Get the script file path object. More...
 
std::string get_token () const
 Get the token as a string. More...
 
std::string get_api_url () const
 Get the api url. More...
 
ghc::filesystem::path get_data_store () const
 Get the data store path. More...
 
std::string get_default_input_namespace () const
 Get the default input namespace. More...
 
std::string get_default_output_namespace () const
 Get the default output namespace. More...
 
std::string get_config_directory () const
 Get the config directory path as a string. More...
 
std::string get_code_run_uuid () const
 Get the code run uuid. More...
 
ghc::filesystem::path link_write (const std::string &data_product)
 Provide a tempory file path for a given data product to be written whilst recording metadata. More...
 
ghc::filesystem::path link_read (const std::string &data_product)
 Return the filepath to a given data product. More...
 
void finalise ()
 Finalise the pipeline Write any pending metadata to the registry Rename any pending writes to their new filename(s): <file hash>.<extension>
 
YAML::Node get_config_data () const
 Get the config data as a Yaml Node. More...
 
API::sptr get_api () const
 Get the api object (used to interact with the pipeline directly) More...
 
RESTAPI get_rest_api_location () const
 Get the rest api location (local / remote) More...
 

Static Public Member Functions

static Config::sptr construct (const ghc::filesystem::path &config_file_path, const ghc::filesystem::path &script_file_path, const std::string &token, RESTAPI api_location)
 
static YAML::Node parse_yaml (ghc::filesystem::path yaml_path)
 Read a given yaml file into a Yaml Node. More...
 

Detailed Description

class for interacting with confifurations

Constructor & Destructor Documentation

◆ ~Config()

FairDataPipeline::Config::~Config ( )

Destroy the Config object.

Member Function Documentation

◆ config_reads_()

YAML::Node FairDataPipeline::Config::config_reads_ ( ) const

Returns the reads Yaml Node from the config.

Returns
YAML::Node

◆ config_writes_()

YAML::Node FairDataPipeline::Config::config_writes_ ( ) const

Returns the writes Yaml Node from the config.

Returns
YAML::Node

◆ get_api()

API::sptr FairDataPipeline::Config::get_api ( ) const
inline

Get the api object (used to interact with the pipeline directly)

Returns
std::shared_ptr<API>

◆ get_api_url()

std::string FairDataPipeline::Config::get_api_url ( ) const
inline

Get the api url.

Returns
std::string

◆ get_code_run_uuid()

std::string FairDataPipeline::Config::get_code_run_uuid ( ) const

Get the code run uuid.

Returns
const std::string&

◆ get_config_data()

YAML::Node FairDataPipeline::Config::get_config_data ( ) const
inline

Get the config data as a Yaml Node.

Returns
YAML::Node

◆ get_config_directory()

std::string FairDataPipeline::Config::get_config_directory ( ) const

Get the config directory path as a string.

Returns
std::string

◆ get_config_file_path()

ghc::filesystem::path FairDataPipeline::Config::get_config_file_path ( ) const
inline

Get the config file path object.

Returns
ghc::filesystem::path

◆ get_data_store()

ghc::filesystem::path FairDataPipeline::Config::get_data_store ( ) const

Get the data store path.

Returns
ghc::filesystem::path

◆ get_default_input_namespace()

std::string FairDataPipeline::Config::get_default_input_namespace ( ) const

Get the default input namespace.

Returns
std::string

◆ get_default_output_namespace()

std::string FairDataPipeline::Config::get_default_output_namespace ( ) const

Get the default output namespace.

Returns
std::string

◆ get_rest_api_location()

RESTAPI FairDataPipeline::Config::get_rest_api_location ( ) const
inline

Get the rest api location (local / remote)

Returns
RESTAPI

◆ get_script_file_path()

ghc::filesystem::path FairDataPipeline::Config::get_script_file_path ( ) const
inline

Get the script file path object.

Returns
ghc::filesystem::path

Get the script file path object

Returns
ghc::filesystem::path

◆ get_token()

std::string FairDataPipeline::Config::get_token ( ) const
inline

Get the token as a string.

Returns
std::string

◆ has_inputs()

bool FairDataPipeline::Config::has_inputs ( ) const

Check whether any inputs have been added.

Returns
true inputs have been added
false inputs have not been added

◆ has_outputs()

bool FairDataPipeline::Config::has_outputs ( ) const

Check whether any outputs have been added.

Returns
true outputs have been added
false outputs have not been added

◆ has_reads()

bool FairDataPipeline::Config::has_reads ( ) const

Check whether the config has reads.

Returns
true config has reads
false config does not have reads

◆ has_writes()

bool FairDataPipeline::Config::has_writes ( ) const

Check whether the config has writes.

Returns
true the config has writes
false the config does not have writes

◆ link_read()

ghc::filesystem::path FairDataPipeline::Config::link_read ( const std::string &  data_product)

Return the filepath to a given data product.

Parameters
data_product
Returns
ghc::filesystem::path

◆ link_write()

ghc::filesystem::path FairDataPipeline::Config::link_write ( const std::string &  data_product)

Provide a tempory file path for a given data product to be written whilst recording metadata.

Parameters
data_product
Returns
ghc::filesystem::path

◆ meta_data_()

YAML::Node FairDataPipeline::Config::meta_data_ ( ) const

Returns the meta_data Yaml Node from the config.

Returns
YAML::Node

◆ parse_yaml()

YAML::Node FairDataPipeline::Config::parse_yaml ( ghc::filesystem::path  yaml_path)
static

Read a given yaml file into a Yaml Node.

Parameters
yaml_path
Returns
YAML::Node

The documentation for this class was generated from the following files: