Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::API::CompositeCatalog Class Reference

CompositeCatalog is responsible for storing and performing options on multiple catalogues. More...

#include <CompositeCatalog.h>

Inheritance diagram for Mantid::API::CompositeCatalog:
Mantid::API::ICatalog

Public Member Functions

void add (const ICatalog_sptr &catalog)
 Adds a catalog to the list of catalogs (m_catalogs) More...
 
 CompositeCatalog ()
 Constructor. More...
 
void getDataFiles (const std::string &investigationId, ITableWorkspace_sptr &outputws) override
 Get datafiles. More...
 
void getDataSets (const std::string &investigationId, ITableWorkspace_sptr &outputws) override
 Get datasets. More...
 
int64_t getNumberOfSearchResults (const ICat::CatalogSearchParam &inputs) override
 Obtain the number of results returned by the search method. More...
 
void keepAlive () override
 Keep current session alive. More...
 
void listInstruments (std::vector< std::string > &instruments) override
 Get instruments list. More...
 
void listInvestigationTypes (std::vector< std::string > &invstTypes) override
 Get investigationtypes list. More...
 
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. More...
 
void logout () override
 Log the user out of the catalog system. More...
 
void myData (ITableWorkspace_sptr &outputws) override
 Show the logged in user's investigations search results. More...
 
void search (const ICat::CatalogSearchParam &inputs, ITableWorkspace_sptr &outputws, const int &offset, const int &limit) override
 Search the catalog for data. More...
 
- Public Member Functions inherited from Mantid::API::ICatalog
virtual void getDataFiles (const std::string &, ITableWorkspace_sptr &)=0
 get datafiles More...
 
virtual void getDataSets (const std::string &, ITableWorkspace_sptr &)=0
 get datasets. More...
 
virtual int64_t getNumberOfSearchResults (const ICat::CatalogSearchParam &)=0
 Obtain the number of results returned by the search method. More...
 
virtual void keepAlive ()=0
 keep alive More...
 
virtual void listInstruments (std::vector< std::string > &)=0
 instrument list More...
 
virtual void listInvestigationTypes (std::vector< std::string > &)=0
 get investigationtype lists More...
 
virtual CatalogSession_sptr login (const std::string &, const std::string &, const std::string &, const std::string &)=0
 method to login to a catalog More...
 
virtual void logout ()=0
 logout from catalog More...
 
virtual void myData (ITableWorkspace_sptr &)=0
 search logged in users data More...
 
virtual void search (const ICat::CatalogSearchParam &, ITableWorkspace_sptr &, const int &, const int &)=0
 Search investigations. More...
 
virtual ~ICatalog ()=default
 Virtual destructor. More...
 

Private Attributes

std::list< ICatalog_sptrm_catalogs
 

Detailed Description

CompositeCatalog is responsible for storing and performing options on multiple catalogues.

Author
Jay Rainey, ISIS Rutherford Appleton Laboratory
Date
18/02/2014

Definition at line 23 of file CompositeCatalog.h.

Constructor & Destructor Documentation

◆ CompositeCatalog()

Mantid::API::CompositeCatalog::CompositeCatalog ( )

Constructor.

Definition at line 12 of file CompositeCatalog.cpp.

Member Function Documentation

◆ add()

void Mantid::API::CompositeCatalog::add ( const ICatalog_sptr catalog)

Adds a catalog to the list of catalogs (m_catalogs)

Add a catalog to the catalog container.

Parameters
catalog:: The catalog to add to the container.

Definition at line 18 of file CompositeCatalog.cpp.

References m_catalogs.

◆ getDataFiles()

void Mantid::API::CompositeCatalog::getDataFiles ( const std::string &  investigationId,
ITableWorkspace_sptr outputws 
)
overridevirtual

Get datafiles.

Obtain and save the datafiles for a given investigation for each catalog in the container.

Parameters
investigationId:: A unique identifier of the investigation.
outputws:: The workspace to store the results.

Implements Mantid::API::ICatalog.

Definition at line 102 of file CompositeCatalog.cpp.

References m_catalogs.

◆ getDataSets()

void Mantid::API::CompositeCatalog::getDataSets ( const std::string &  investigationId,
ITableWorkspace_sptr outputws 
)
overridevirtual

Get datasets.

Obtain and save the datasets for a given investigation for each catalog in the container.

Parameters
investigationId:: A unique identifier of the investigation.
outputws:: The workspace to store the results.

Implements Mantid::API::ICatalog.

Definition at line 90 of file CompositeCatalog.cpp.

References m_catalogs.

◆ getNumberOfSearchResults()

int64_t Mantid::API::CompositeCatalog::getNumberOfSearchResults ( const ICat::CatalogSearchParam inputs)
overridevirtual

Obtain the number of results returned by the search method.

Obtain the number of investigations to be returned by the catalog.

Returns
The number of investigations from the search performed.

Implements Mantid::API::ICatalog.

Definition at line 65 of file CompositeCatalog.cpp.

References m_catalogs.

◆ keepAlive()

void Mantid::API::CompositeCatalog::keepAlive ( )
overridevirtual

Keep current session alive.

Keep each catalog session alive in the container.

Implements Mantid::API::ICatalog.

Definition at line 131 of file CompositeCatalog.cpp.

References m_catalogs.

◆ listInstruments()

void Mantid::API::CompositeCatalog::listInstruments ( std::vector< std::string > &  instruments)
overridevirtual

Get instruments list.

Obtain a list of instruments from each catalog in the container.

Parameters
instruments:: A reference to the vector to store the results.

Implements Mantid::API::ICatalog.

Definition at line 112 of file CompositeCatalog.cpp.

References m_catalogs.

◆ listInvestigationTypes()

void Mantid::API::CompositeCatalog::listInvestigationTypes ( std::vector< std::string > &  invstTypes)
overridevirtual

Get investigationtypes list.

Obtain a list of investigations from each catalog in the container.

Parameters
invstTypes:: A reference to the vector to store the results.

Implements Mantid::API::ICatalog.

Definition at line 122 of file CompositeCatalog.cpp.

References m_catalogs.

◆ login()

CatalogSession_sptr Mantid::API::CompositeCatalog::login ( const std::string &  username,
const std::string &  password,
const std::string &  endpoint,
const std::string &  facility 
)
overridevirtual

Log the user into the catalog system.

Authenticate the user against all catalogues in the container.

Parameters
username:: The login name of the user.
password:: The password of the user.
endpoint:: The endpoint url of the catalog to log in to.
facility:: The facility of the catalog to log in to.

Implements Mantid::API::ICatalog.

Definition at line 27 of file CompositeCatalog.cpp.

References UNUSED_ARG.

◆ logout()

void Mantid::API::CompositeCatalog::logout ( )
overridevirtual

Log the user out of the catalog system.

Log the user out of all catalogues in the container.

Implements Mantid::API::ICatalog.

Definition at line 39 of file CompositeCatalog.cpp.

References m_catalogs.

◆ myData()

void Mantid::API::CompositeCatalog::myData ( ITableWorkspace_sptr outputws)
overridevirtual

Show the logged in user's investigations search results.

Obtain and save the investigations that the user is an investigator of within each catalog.

Parameters
outputws:: The workspace to store the results.

Implements Mantid::API::ICatalog.

Definition at line 78 of file CompositeCatalog.cpp.

References m_catalogs.

◆ search()

void Mantid::API::CompositeCatalog::search ( const ICat::CatalogSearchParam inputs,
ITableWorkspace_sptr outputws,
const int &  offset,
const int &  limit 
)
overridevirtual

Search the catalog for data.

Search through all catalogues that are in the container.

Parameters
inputs:: A reference to a class containing the user's inputs.
outputws:: A shared pointer to workspace were the search results are stored.
offset:: Skip this many rows and start returning rows from this point.
limit:: The limit of the number of rows returned by the query.

Implements Mantid::API::ICatalog.

Definition at line 54 of file CompositeCatalog.cpp.

References m_catalogs.

Member Data Documentation

◆ m_catalogs

std::list<ICatalog_sptr> Mantid::API::CompositeCatalog::m_catalogs
private

The documentation for this class was generated from the following files: