9#include <boost/algorithm/string/regex.hpp>
180 if (inputDate.empty())
183 std::vector<std::string> dateSegments;
185 boost::algorithm::split_regex(dateSegments, inputDate, boost::regex(
"/"));
187 std::string isoDate = dateSegments.at(2) +
"-" + dateSegments.at(1) +
"-" + dateSegments.at(0) +
" 00:00:00.000";
189 return Types::Core::DateAndTime(isoDate).to_time_t();
const std::string & getInvestigationName() const
Get the name of the investigation to search for.
void setKeywords(const std::string &keywords)
Set the keywords to search for.
void setSampleName(const std::string &sampleName)
Set the sample name to search for.
void setInvestigationId(const std::string &)
Set the investigation id to search for.
std::string m_investigationName
investigation anme
const double & getRunStart() const
Get the start run from user input.
std::string m_instrName
instrument name
time_t m_startDate
start date
const std::string & getSampleName() const
Get the sample name.
const std::string & getInvestigatorSurName() const
Get the investigators name.
time_t getTimevalue(const std::string &inputDate)
Saves the start/end date times to time_t value.
const std::string & getInvestigationId() const
Get the investigation id.
const time_t & getStartDate() const
Get the investigation start date.
void setRunEnd(const double &endRun)
Set the end run to search for.
CatalogSearchParam()
constructor
const time_t & getEndDate() const
Get the investigation end date.
std::string m_keywords
search keywords
const std::string & getDatafileName() const
Get the datafile name.
const std::string & getInstrument() const
Get the instrument name.
void setDatafileName(const std::string &datafileName)
Set the datafile name to search for.
void setInvestigatorSurName(const std::string &investigatorName)
Set the investigators name to search for.
const std::string & getKeywords() const
Get the keywords to search investigations for.
const std::string & getInvestigationType() const
Get the investigation type.
void setInvestigationName(const std::string &instName)
Set the investigation name to search for.
double m_endRun
end run number
void setInstrument(const std::string &instrName)
Set the instrument to search for.
std::string m_datafileName
Datafile name.
double m_startRun
start run number
void setRunStart(const double &startRun)
Set the start run to search for.
bool m_myData
My data checkbox.
std::string m_sampleName
sample name
const double & getRunEnd() const
Get the end run.
std::string m_investigationType
investigation type
std::string m_investigatorSurname
investigator surname
bool getMyData() const
Get the "my data only" flag.
std::string m_investigationId
investigation id
void setStartDate(const time_t &startDate)
Set the start date to search for.
void setEndDate(const time_t &endDate)
Set the end date to search for.
void setInvestigationType(const std::string &invstType)
Set the investigation type to search for.
void setMyData(bool flag)
Set the "my data only" flag to search only user's data if true.