Mantid
Loading...
Searching...
No Matches
CatalogHelper.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "DllOption.h"
11
12namespace MantidQt {
13namespace MantidWidgets {
15
16public:
19 const std::vector<std::string> getInstrumentList(const std::vector<std::string> &sessionIDs);
21 const std::vector<std::string> getInvestigationTypeList(const std::vector<std::string> &sessionIDs);
23 void executeSearch(const std::map<std::string, std::string> &userInputs, const int &offset, const int &limit,
24 const std::vector<std::string> &sessionIDs);
27 int64_t getNumberOfSearchResults(const std::map<std::string, std::string> &userInputFields,
28 const std::vector<std::string> &sessionIDs);
30 void executeGetDataFiles(const std::string &investigationId, const std::string &sessionID);
33 const std::vector<std::string>
34 downloadDataFiles(const std::vector<std::pair<int64_t, std::string>> &userSelectedFiles,
35 const std::string &downloadPath, const std::string &sessionID);
37 const std::map<std::string, std::string> validateProperties(const std::map<std::string, std::string> &inputFields);
39 time_t getTimevalue(const std::string &inputDate);
44
45private:
50 const std::string propertyDocumentation(const std::vector<Mantid::Kernel::Property *> &properties,
51 const std::string &name);
56 const std::map<std::string, std::string> &userInputFields);
57};
58} // namespace MantidWidgets
59} // namespace MantidQt
std::string name
Definition Run.cpp:60
#define EXPORT_OPT_MANTIDQT_COMMON
Definition DllOption.h:15
const std::vector< std::string > getInvestigationTypeList(const std::vector< std::string > &sessionIDs)
Obtain the list of instruments that are available.
void showLoginDialog()
Executes the catalog login algorithm dialog, returning immediately.
Mantid::API::IAlgorithm_sptr createCatalogAlgorithm(const std::string &algName)
Creates an algorithm with the name provided.
void showPublishDialog()
Create a publishing dialog.
int64_t getNumberOfSearchResults(const std::map< std::string, std::string > &userInputFields, const std::vector< std::string > &sessionIDs)
Obtain the number of search results to be returned by the query of the user.
const std::string propertyDocumentation(const std::vector< Mantid::Kernel::Property * > &properties, const std::string &name)
Obtain the documentation for a given name from the given algorithm properties.
const std::vector< std::string > downloadDataFiles(const std::vector< std::pair< int64_t, std::string > > &userSelectedFiles, const std::string &downloadPath, const std::string &sessionID)
Download dataFile (via HTTP or copy if access to archive) and return the path to it.
void setSearchProperties(const Mantid::API::IAlgorithm_sptr &catalogAlgorithm, const std::map< std::string, std::string > &userInputFields)
Set the "search" properties to their related input fields.
void executeAsynchronously(const Mantid::API::IAlgorithm_sptr &algorithm)
Execute the given algorithm asynchronously.
const std::vector< std::string > getInstrumentList(const std::vector< std::string > &sessionIDs)
Obtain the list of instruments that are available for the given session information.
void executeSearch(const std::map< std::string, std::string > &userInputs, const int &offset, const int &limit, const std::vector< std::string > &sessionIDs)
Run the search algorithm with the given user input.
time_t getTimevalue(const std::string &inputDate)
Creates a time_t value from an input date ("23/06/2003") for comparison.
const std::map< std::string, std::string > validateProperties(const std::map< std::string, std::string > &inputFields)
Validate each input field against the related algorithm property.
void executeGetDataFiles(const std::string &investigationId, const std::string &sessionID)
Search for all related dataFiles for the specified investigation.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm