1#ifndef __FDP_APIOBJECT_HXX__
2#define __FDP_APIOBJECT_HXX__
8#include "fdp/utilities/logging.hxx"
10namespace FairDataPipeline {
24 typedef std::shared_ptr< ApiObject > sptr;
26 static sptr from_json(
const Json::Value& j );
39 int add(
const std::string& key,
int value );
40 int add(
const std::string& key,
float value );
41 int add(
const std::string& key,
double value );
42 int add(
const std::string& key,
const std::string& value );
43 int add(
const std::string& key,
const ApiObject& value );
45 int remove(
const std::string& key );
Class for API objects.
Definition: api_object.hxx:15
static ApiObject::sptr construct(void)
Construct a new Api Object object.
Definition: api_object.cxx:17
int get_value_as_int(const std::string &key) const
Get the value of a given key as int object.
Definition: api_object.cxx:96
std::string get_value_as_string(const std::string &key) const
Get the value of a given key as string object.
Definition: api_object.cxx:93
int get_id() const
Get the object id from the uri.
Definition: api_object.cxx:65
std::string get_uri() const
Get the object uri.
Definition: api_object.cxx:89
bool is_empty()
Check to see if the object is empty.
Definition: api_object.cxx:100
std::string get_first_component() const
Get the first component of the object.
Definition: api_object.cxx:107
static int get_id_from_string(std::string url)
Get the object type from the uri.
Definition: api_object.cxx:69
std::string get_type() const
Returns the object type from the object uri_ (table)
Definition: api_object.cxx:81