29 const std::string &facility)
override;
34 const int &limit)
override;
50 const std::string
getDownloadURL(
const long long &fileID)
override;
52 const std::string
getUploadURL(
const std::string &investigationID,
const std::string &createFileName,
53 const std::string &dataFileDescription)
override;
76 std::string
formatDateTime(
const time_t ×tamp,
const std::string &format);
This class is responsible for interfacing with the Information Data Service (IDS) to upload and downl...
This class creates an interface for information catalogs to support multiple facilities.
TableRow represents a row in a TableWorkspace.
This class is used in Catalog Search service to set/get all the inputs to search for.
This class is responsible for the implementation of ICat4 version based information catalogs.
const std::string getFileLocation(const long long &fileID) override
Get the file location string(s) from archive.
std::string buildSearchQuery(const CatalogSearchParam &inputs)
Creates a search query string based on inputs provided by the user.
void listInvestigationTypes(std::vector< std::string > &invstTypes) override
Get investigationtypes list.
std::vector< ICat4::xsd__anyType * > performSearch(ICat4::ICATPortBindingProxy &icat, std::string query)
Returns the results of a search against ICAT for a given query.
int64_t getNumberOfSearchResults(const CatalogSearchParam &inputs) override
Obtain the number of results returned by the search method.
void saveInvestigations(std::vector< ICat4::xsd__anyType * > response, API::ITableWorkspace_sptr &outputws)
Saves investigations to a table workspace.
void setSSLContext(ICat4::ICATPortBindingProxy &icat)
Defines the SSL authentication scheme.
bool isAccessAllowed(ICat4::ns1__accessType accessType, T &bean)
Is the specified access type allowed for a specific bean?
void keepAlive() override
Keep current session alive.
void getDataFiles(const std::string &investigationId, Mantid::API::ITableWorkspace_sptr &outputws) override
Get datafiles.
void logout() override
Log the user out of the catalog system.
void savetoTableWorkspace(T *input, Mantid::API::TableRow &table)
Template method to save data to table workspace.
void saveDataFiles(std::vector< ICat4::xsd__anyType * > response, API::ITableWorkspace_sptr &outputws)
Saves result from "getDataFiles" to workspace.
void saveDataSets(const std::vector< ICat4::xsd__anyType * > &response, API::ITableWorkspace_sptr &outputws)
Loops through the response vector and saves the datasets details to a table workspace.
std::string bytesToString(int64_t &fileSize)
Convert a file size to human readable file format.
API::CatalogSession_sptr m_session
void myData(Mantid::API::ITableWorkspace_sptr &outputws) override
Show the logged in user's investigations search results.
int64_t createMantidDataset(const std::string &investigationID)
Creates a dataset for an investigation (based on ID) named 'mantid' if it does not already exist.
std::string formatDateTime(const time_t ×tamp, const std::string &format)
Formats a given timestamp to human readable datetime.
void listInstruments(std::vector< std::string > &instruments) override
Get instruments list.
void setICATProxySettings(ICat4::ICATPortBindingProxy &icat)
Sets the soap-endpoint & SSL context for the given ICAT proxy.
void search(const CatalogSearchParam &inputs, Mantid::API::ITableWorkspace_sptr &outputws, const int &offset, const int &limit) override
Search the catalog for data.
ICat4Catalog()
Constructor.
const std::string getDownloadURL(const long long &fileID) override
Get the url(s) based on the fileID.
void getDataSets(const std::string &investigationId, Mantid::API::ITableWorkspace_sptr &outputws) override
Get datasets.
API::ITableWorkspace_sptr getPublishInvestigations() override
Obtains the investigations that the user can publish to and saves related information to a workspace.
API::CatalogSession_sptr login(const std::string &username, const std::string &password, const std::string &endpoint, const std::string &facility) override
Log the user into the catalog system.
const std::string getUploadURL(const std::string &investigationID, const std::string &createFileName, const std::string &dataFileDescription) override
get URL of where to PUT (publish) files.
void throwErrorMessage(ICat4::ICATPortBindingProxy &icat)
Throws an error message (returned by gsoap) to Mantid upper layer.
int64_t getMantidDatasetId(const std::string &investigationID)
Search the archive & obtain the "mantid" dataset ID for a specific investigation if it exists.
std::shared_ptr< CatalogSession > CatalogSession_sptr
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
Helper class which provides the Collimation Length for SANS instruments.