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

#include <Citation.h>

Public Member Functions

const std::string & bibtex () const
 
 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 which the NXCite is contained. More...
 
 Citation (const std::string &doi="", const std::string &bibtex="", const std::string &endnote="", const std::string &url="", const std::string &description="")
 There are some strict parameters that the function arguments must adhere to: More...
 
const std::string & description () const
 
const std::string & doi () const
 
const std::string & endnote () const
 
bool operator== (const Citation &rhs) const
 
void saveNexus (::NeXus::File *file, const std::string &group)
 
const std::string & url () const
 

Private Member Functions

void loadNexus (::NeXus::File *file, const std::string &group)
 

Private Attributes

std::string m_bibtex
 
std::string m_description
 
std::string m_doi
 
std::string m_endnote
 
std::string m_url
 

Detailed Description

Definition at line 19 of file Citation.h.

Constructor & Destructor Documentation

◆ Citation() [1/2]

Mantid::API::Citation::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 which the NXCite is contained.

Definition at line 49 of file Citation.cpp.

References loadNexus().

◆ Citation() [2/2]

Mantid::API::Citation::Citation ( const std::string &  doi = "",
const std::string &  bibtex = "",
const std::string &  endnote = "",
const std::string &  url = "",
const std::string &  description = "" 
)

There are some strict parameters that the function arguments must adhere to:

  • description is always optional (this isn't needed for citation, but gives insight as to why this citation is relevant)
  • if bibtex is provided endnote must also be provided, and vice-versa (BibTex and Endnote contain essentially the same information, they can both be created if one can be. BibTex and Endnote do not imply a DOI is minted)
  • if doi is provided, url, bibtex and endnote must all be provided (BibTex and Endnote can be generated from DOIs)
  • if none of doi, bibtex or endnote are provided, url must be provided (there must be something there, even if this isn't citable a URL is better than nothing)
Parameters
doi- https://www.baylor.edu/lib/electrres/index.php?id=49231
bibtex- https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM
endnote- https://en.wikipedia.org/wiki/RIS_(file_format)
url- The website url for which the citation refers
description- The description of the thing that is being cited

Definition at line 30 of file Citation.cpp.

References bibtex(), description(), doi(), endnote(), and url().

Member Function Documentation

◆ bibtex()

const std::string & Mantid::API::Citation::bibtex ( ) const

Definition at line 59 of file Citation.cpp.

References m_bibtex.

Referenced by Citation(), and export_Citation().

◆ description()

const std::string & Mantid::API::Citation::description ( ) const

Definition at line 56 of file Citation.cpp.

References m_description.

Referenced by Citation(), and export_Citation().

◆ doi()

const std::string & Mantid::API::Citation::doi ( ) const

Definition at line 58 of file Citation.cpp.

References m_doi.

Referenced by Citation(), and export_Citation().

◆ endnote()

const std::string & Mantid::API::Citation::endnote ( ) const

Definition at line 60 of file Citation.cpp.

References m_endnote.

Referenced by Citation(), and export_Citation().

◆ loadNexus()

void Mantid::API::Citation::loadNexus ( ::NeXus::File *  file,
const std::string &  group 
)
private

Definition at line 62 of file Citation.cpp.

References m_bibtex, m_description, m_doi, m_endnote, and m_url.

Referenced by Citation().

◆ operator==()

bool Mantid::API::Citation::operator== ( const Citation rhs) const

Definition at line 51 of file Citation.cpp.

References m_bibtex, m_description, m_doi, m_endnote, m_url, and rhs.

◆ saveNexus()

void Mantid::API::Citation::saveNexus ( ::NeXus::File *  file,
const std::string &  group 
)

Definition at line 72 of file Citation.cpp.

References m_bibtex, m_description, m_doi, m_endnote, and m_url.

Referenced by export_Citation().

◆ url()

const std::string & Mantid::API::Citation::url ( ) const

Definition at line 57 of file Citation.cpp.

References m_url.

Referenced by Citation(), and export_Citation().

Member Data Documentation

◆ m_bibtex

std::string Mantid::API::Citation::m_bibtex
private

Definition at line 66 of file Citation.h.

Referenced by bibtex(), loadNexus(), operator==(), and saveNexus().

◆ m_description

std::string Mantid::API::Citation::m_description
private

Definition at line 69 of file Citation.h.

Referenced by description(), loadNexus(), operator==(), and saveNexus().

◆ m_doi

std::string Mantid::API::Citation::m_doi
private

Definition at line 65 of file Citation.h.

Referenced by doi(), loadNexus(), operator==(), and saveNexus().

◆ m_endnote

std::string Mantid::API::Citation::m_endnote
private

Definition at line 67 of file Citation.h.

Referenced by endnote(), loadNexus(), operator==(), and saveNexus().

◆ m_url

std::string Mantid::API::Citation::m_url
private

Definition at line 68 of file Citation.h.

Referenced by loadNexus(), operator==(), saveNexus(), and url().


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