9#include <nexus/NeXusFile.hpp>
31 const std::string &url,
const std::string &description)
32 : m_doi(doi), m_bibtex(bibtex), m_endnote(endnote), m_url(url), m_description(description) {
34 throw std::invalid_argument(
"No arguements were given!");
39 throw std::invalid_argument(
"If bibtex is provided, endnote must also be provided and vice-versa");
42 throw std::invalid_argument(
"If doi is provided then url, bibtex and endnote must be");
46 throw std::invalid_argument(
"If none of doi, bibtex, or endnote is provided, then url must be");
63 file->openGroup(group,
"NXCite");
64 file->readData(
"url",
m_url);
66 file->readData(
"doi",
m_doi);
73 file->makeGroup(group,
"NXCite",
true);
74 file->writeData(
"url",
m_url);
76 file->writeData(
"doi",
m_doi);
const std::vector< double > & rhs
std::string m_description
const std::string & endnote() const
const std::string & bibtex() const
void loadNexus(::NeXus::File *file, const std::string &group)
void saveNexus(::NeXus::File *file, const std::string &group)
Citation(::NeXus::File *file, const std::string &group)
This constructor will load the data from the given file using the given group as the NeXus Group in w...
const std::string & doi() const
const std::string & url() const
const std::string & description() const
bool operator==(const Citation &rhs) const