Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::RemoteData::CKAN Class Reference
+ Collaboration diagram for Feel::RemoteData::CKAN:

Public Member Functions

bool canDownload () const
 Return true if enough information is available to download a file.
 
bool canUpload () const
 Return true if enough information is available to upload data.
 
 CKAN (CKAN &&)=default
 
 CKAN (CKAN const &)=default
 
 CKAN (std::string const &desc, WorldComm &worldComm=Environment::worldComm())
 Initialize from a description: ckan:{url:https://ckan.example.com,api_key:xxx,token:yyy,...}.
 
std::tuple< std::vector< std::shared_ptr< FolderInfo > >, std::vector< std::shared_ptr< ItemInfo > >, std::vector< std::shared_ptr< FileInfo > > > contents () const
 Get contents of a CKAN dataset.
 
nl::json createDataset (const std::string &datasetName) const
 
std::string createDataset (const std::string &name, const std::string &organization, const std::string &description) const
 
std::string createResource (const std::string &name, const std::string &description, const std::string &parentId) const
 Create a new resource in CKAN.
 
bool deleteDataset (const std::string &datasetId) const
 
bool deleteResource (const std::string &resourceId) const
 Delete a resource by ID.
 
std::vector< std::string > download (std::string const &dir, int timeout) const
 Download data from CKAN with timeout.
 
std::vector< std::string > download (std::string const &dir=Environment::downloadsRepository()) const
 Download data from CKAN.
 
bool isInit () const
 Check if initialized.
 
std::vector< std::string > listOrganizations () const
 List all organizations available on the CKAN instance.
 
void replaceResource (std::string const &resourcePath, std::string const &resourceId) const
 Replace a resource.
 
nl::json resourceLookup (const std::string &pathOrId) const
 Lookup a resource by path or ID.
 
std::vector< std::string > upload (const std::string &dataPath, const std::string &datasetId, bool sync) const
 
std::vector< std::string > upload (std::string const &dataPath, std::string const &parentId, int timeout) const
 Upload data to CKAN with timeout.
 
std::vector< std::string > upload (std::string const &dataPath, std::string const &parentId="") const
 Upload data to CKAN.