fast::DataHub class

Object uses to browse and download data, models and pipelines from the FAST DataHub.

Public types

class Download
Download results from DataHub.
class Item
Object representing and item on the DataHub.

Constructors, destructors, conversion operators

DataHub(std::string URL = "", std::string storageDirectory = "") explicit
Setup DataHub object.

Public functions

auto getItems(std::string tag) -> std::vector<DataHub::Item>
Get list of items for a given tag.
auto getItem(std::string id) -> DataHub::Item
Get item details from DataHub.
auto download(std::string itemID, bool force = false) -> DataHub::Download
Download an item and all dependencies from the DataHub.
auto isDownloaded(std::string itemID) -> bool
Whether an item (including dependencies) has been downloaded or not.
auto getStorageDirectory() const -> std::string
Get DataHub storage directory.
auto getURL() const -> std::string
Get DataHub URL.

Signals

void progress(int fileNr, int percent)
void finished()

Function documentation

fast::DataHub::DataHub(std::string URL = "", std::string storageDirectory = "") explicit

Setup DataHub object.

Parameters
URL Address to DataHub. If empty use default.
storageDirectory Where on disk to store downloaded items. If empty use default.

std::vector<DataHub::Item> fast::DataHub::getItems(std::string tag)

Get list of items for a given tag.

Parameters
tag
Returns list of items

DataHub::Item fast::DataHub::getItem(std::string id)

Get item details from DataHub.

Parameters
id
Returns item

DataHub::Download fast::DataHub::download(std::string itemID, bool force = false)

Download an item and all dependencies from the DataHub.

Parameters
itemID
force Force item to be downloaded (override version check)

bool fast::DataHub::isDownloaded(std::string itemID)

Whether an item (including dependencies) has been downloaded or not.

Parameters
itemID