NCBI C++ ToolKit
Classes | Functions | Variables
PubmedArticle.cpp File Reference
#include <ncbi_pch.hpp>
#include <codecvt>
#include <numeric>
#include <regex>
#include <unordered_map>
#include <objects/pubmed/Pubmed_entry.hpp>
#include <objects/medline/Medline_entry.hpp>
#include <objects/general/Date.hpp>
#include <objects/general/Date_std.hpp>
#include <objects/biblio/biblio__.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/medline/medline__.hpp>
#include <objtools/eutils/efetch/efetch__.hpp>
#include <util/unicode.hpp>
#include <objtools/eutils/efetch/PubmedArticle.hpp>
+ Include dependency graph for PubmedArticle.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.


struct  pubmed_date_t


 USING_SCOPE (objects)
template<typename StringT >
void s_ToLower (StringT &str)
template<typename StringT >
void s_ToUpper (StringT &str)
static bool s_StringToInt (const string &str, int &i)
static int s_TranslateMonth (const string &month_str)
template<class container_type , class check_type , class proc_type >
void s_ForeachToken (container_type &container, check_type f, proc_type proc)
static string utf8_to_string (const string &str)
template<class TE >
string s_Utf8TextListToString (const list< CRef< TE >> &text_list)
static string s_GetInitialsFromForeName (string fore_name)
static pubmed_date_t s_GetPubmedDate (const CPubDate &pub_date)
static CRef< CDates_GetDateFromArticleDate (const CArticleDate &adate)
static CRef< CTitles_GetJournalTitle (const CPubmedArticle &pubmed_article)
static bool s_SetCommentCorrection (CRef< CImprint > &imprint, const CCommentsCorrectionsList &comments_corrections, CCitRetract::EType type, const string &ref_type)
static EPubStatus s_GetPublicationStatusId (const string &publication_status)
static CRef< CImprints_GetImprint (const CPubmedArticle &pubmed_article)
static CRef< CCit_jours_GetJournalCitation (const CPubmedArticle &pubmed_article)
bool s_IsValidYN (const CAuthor &auth)
static CRef< CAuth_lists_GetAuthorList (const CArticle &article)
static objects::CArticleId::E_Choice s_GetArticleIdTypeId (const CArticleId &article_id)
static CRef< CCit_arts_GetCitation (const CPubmedArticle &pubmed_article)
static void s_FillMesh (CMedline_entry::TMesh &mesh, const CMeshHeadingList &mesh_heading_list)
static void s_FillChem (CMedline_entry::TSubstance &chems, const CChemicalList &chemical_list)
static int s_GetDatabankTypeId (const string &databank_name)
static void s_FillXref (CMedline_entry::TXref &refs, const CDataBankList &databank_list)
static void s_FillGenes (CMedline_entry::TGene &mgenes, const CGeneSymbolList &gene_symbol_list)
static void s_FillPubtypeList (CMedline_entry::TPub_type &pub_types, const CPublicationTypeList &publication_type_list)
static CRef< CPubMedPubDates_FindPubDateStatus (const list< CRef< CPubMedPubDate >> &pubmed_pubdates, CPubMedPubDate::C_Attlist::EAttlist_PubStatus status)
static string s_GetAbstractText (const CAbstract &abstr)
static CRef< CMedline_entrys_GetMedlineEntry (const CPubmedArticle &pubmed_article)
string s_CleanupText (string str)
CRef< CDates_GetDateFromPubDate (const CPubDate &pub_date)
CRef< CDates_GetDateFromPubMedPubDate (const CPubMedPubDate &pdate)
string s_GetArticleTitleStr (const CArticleTitle &article_title)
string s_GetVernacularTitleStr (const CVernacularTitle &vernacular_title)
CRef< CTitles_MakeTitle (const string &title_str, const string &vernacular_title_str)
string s_GetAuthorMedlineName (const CAuthor &author)
string s_GetPagination (const CPagination &pagination)
CRef< CArticleIdSets_GetArticleIdSet (const CArticleIdList &article_id_list, const CArticle *article)
void s_FillGrants (list< string > &id_nums, const CGrantList &grant_list)



Function Documentation

◆ s_CleanupText()

string s_CleanupText ( string  str)

Definition at line 743 of file PubmedArticle.cpp.

References str(), and utf8_to_string().

Referenced by s_GetMedlineEntry().

◆ s_FillChem()

static void s_FillChem ( CMedline_entry::TSubstance chems,
const CChemicalList chemical_list 

Definition at line 582 of file PubmedArticle.cpp.

References CChemicalList_Base::GetChemical(), and toupper().

Referenced by s_GetMedlineEntry().

◆ s_FillGenes()

static void s_FillGenes ( CMedline_entry::TGene mgenes,
const CGeneSymbolList gene_symbol_list 

Definition at line 652 of file PubmedArticle.cpp.

References CGeneSymbolList_Base::GetGeneSymbol().

Referenced by s_GetMedlineEntry().

◆ s_FillGrants()

void s_FillGrants ( list< string > &  id_nums,
const CGrantList grant_list 

Definition at line 989 of file PubmedArticle.cpp.

References CGrantList_Base::GetGrant(), and utf8_to_string().

Referenced by s_GetMedlineEntry().

◆ s_FillMesh()

static void s_FillMesh ( CMedline_entry::TMesh mesh,
const CMeshHeadingList mesh_heading_list 

◆ s_FillPubtypeList()

static void s_FillPubtypeList ( CMedline_entry::TPub_type pub_types,
const CPublicationTypeList publication_type_list 

Definition at line 660 of file PubmedArticle.cpp.

References CPublicationTypeList_Base::GetPublicationType().

Referenced by s_GetMedlineEntry().

◆ s_FillXref()

static void s_FillXref ( CMedline_entry::TXref refs,
const CDataBankList databank_list 

◆ s_FindPubDateStatus()

static CRef<CPubMedPubDate> s_FindPubDateStatus ( const list< CRef< CPubMedPubDate >> &  pubmed_pubdates,
CPubMedPubDate::C_Attlist::EAttlist_PubStatus  status 

Definition at line 670 of file PubmedArticle.cpp.

Referenced by s_GetMedlineEntry().

◆ s_ForeachToken()

template<class container_type , class check_type , class proc_type >
void s_ForeachToken ( container_type &  container,
check_type  f,
proc_type  proc 

Definition at line 135 of file PubmedArticle.cpp.

References f(), first(), and proc.

Referenced by s_GetInitialsFromForeName(), s_GetPagination(), and s_GetPubmedDate().

◆ s_GetAbstractText()

static string s_GetAbstractText ( const CAbstract abstr)

Definition at line 683 of file PubmedArticle.cpp.

References CAbstract_Base::GetAbstractText(), label, and s_TextListToString().

Referenced by s_GetMedlineEntry().

◆ s_GetArticleIdSet()

CRef<CArticleIdSet> s_GetArticleIdSet ( const CArticleIdList article_id_list,
const CArticle article 

◆ s_GetArticleIdTypeId()

static objects::CArticleId::E_Choice s_GetArticleIdTypeId ( const CArticleId article_id)

◆ s_GetArticleTitleStr()

string s_GetArticleTitleStr ( const CArticleTitle article_title)

◆ s_GetAuthorList()

static CRef<CAuth_list> s_GetAuthorList ( const CArticle article)

◆ s_GetAuthorMedlineName()

string s_GetAuthorMedlineName ( const CAuthor author)

◆ s_GetCitation()

static CRef<CCit_art> s_GetCitation ( const CPubmedArticle pubmed_article)

◆ s_GetDatabankTypeId()

static int s_GetDatabankTypeId ( const string databank_name)

◆ s_GetDateFromArticleDate()

static CRef<CDate> s_GetDateFromArticleDate ( const CArticleDate adate)

◆ s_GetDateFromPubDate()

CRef<CDate> s_GetDateFromPubDate ( const CPubDate pub_date)

◆ s_GetDateFromPubMedPubDate()

CRef<CDate> s_GetDateFromPubMedPubDate ( const CPubMedPubDate pdate)

◆ s_GetImprint()

static CRef<CImprint> s_GetImprint ( const CPubmedArticle pubmed_article)

Definition at line 370 of file PubmedArticle.cpp.

References CArticleDate_Base::C_Attlist::eAttlist_DateType_Electronic, ePubStatus_other, CCitRetract_Base::eType_erratum, CCitRetract_Base::eType_in_error, CCitRetract_Base::eType_notice, CCitRetract_Base::eType_retracted, CIssue_Base::Get(), CVolume_Base::Get(), CMedlineCitation_Base::GetArticle(), CArticle_Base::GetArticleDate(), CArticle_Base::GetAttlist(), CMedlineCitation_Base::GetCommentsCorrectionsList(), CPubmedData_Base::GetHistory(), CJournalIssue_Base::GetIssue(), CArticle_Base::GetJournal(), CArticle_Base::GetLanguage(), CPubmedArticle_Base::GetMedlineCitation(), CArticle_Base::C_PE_2::C_PE::GetPagination(), CArticle_Base::C_PE_2::GetPE(), CArticle_Base::GetPE_2(), CJournalIssue_Base::GetPubDate(), CPubmedData_Base::GetPublicationStatus(), CPubmedArticle_Base::GetPubmedData(), CHistory_Base::GetPubMedPubDate(), CArticle_Base::C_Attlist::GetPubModel(), CJournalIssue_Base::GetVolume(), CArticle_Base::C_PE_2::IsPE(), CMedlineCitation_Base::IsSetCommentsCorrectionsList(), CPubmedData_Base::IsSetHistory(), CJournalIssue_Base::IsSetIssue(), CJournalIssue_Base::IsSetVolume(), journal(), next(), s_GetDateFromArticleDate(), s_GetDateFromPubDate(), s_GetDateFromPubMedPubDate(), s_GetPagination(), s_GetPublicationStatusId(), s_SetCommentCorrection(), CPubStatusDateSet_Base::Set(), CImprint_Base::SetDate(), CImprint_Base::SetHistory(), CImprint_Base::SetIssue(), CImprint_Base::SetLanguage(), CImprint_Base::SetPages(), CImprint_Base::SetPubstatus(), and CImprint_Base::SetVolume().

Referenced by s_GetJournalCitation().

◆ s_GetInitialsFromForeName()

static string s_GetInitialsFromForeName ( string  fore_name)

Definition at line 171 of file PubmedArticle.cpp.

References isspace(), s_ForeachToken(), s_ToUpper(), and string.

Referenced by s_GetAuthorMedlineName().

◆ s_GetJournalCitation()

static CRef<CCit_jour> s_GetJournalCitation ( const CPubmedArticle pubmed_article)

Definition at line 443 of file PubmedArticle.cpp.

References s_GetImprint(), and s_GetJournalTitle().

Referenced by s_GetCitation().

◆ s_GetJournalTitle()

static CRef<CTitle> s_GetJournalTitle ( const CPubmedArticle pubmed_article)

◆ s_GetMedlineEntry()

static CRef<CMedline_entry> s_GetMedlineEntry ( const CPubmedArticle pubmed_article)

◆ s_GetPagination()

string s_GetPagination ( const CPagination pagination)

◆ s_GetPublicationStatusId()

static EPubStatus s_GetPublicationStatusId ( const string publication_status)

◆ s_GetPubmedDate()

static pubmed_date_t s_GetPubmedDate ( const CPubDate pub_date)

◆ s_GetVernacularTitleStr()

string s_GetVernacularTitleStr ( const CVernacularTitle vernacular_title)

Definition at line 818 of file PubmedArticle.cpp.

References CVernacularTitle_Base::Get(), and s_Utf8TextListToString().

Referenced by s_GetTitle().

◆ s_IsValidYN()

bool s_IsValidYN ( const CAuthor auth)

◆ s_MakeTitle()

CRef<CTitle> s_MakeTitle ( const string title_str,
const string vernacular_title_str 

Definition at line 824 of file PubmedArticle.cpp.

References CRef< C, Locker >::Reset(), and CTitle_Base::Set().

◆ s_SetCommentCorrection()

static bool s_SetCommentCorrection ( CRef< CImprint > &  imprint,
const CCommentsCorrectionsList comments_corrections,
CCitRetract::EType  type,
const string ref_type 

◆ s_StringToInt()

static bool s_StringToInt ( const string str,
int i 

Definition at line 93 of file PubmedArticle.cpp.

References i, and str().

Referenced by s_GetPubmedDate(), and s_TranslateMonth().

◆ s_ToLower()

template<typename StringT >
void s_ToLower ( StringT &  str)

Definition at line 76 of file PubmedArticle.cpp.

References locale, and str().

Referenced by s_FillXref().

◆ s_ToUpper()

template<typename StringT >
void s_ToUpper ( StringT &  str)

Definition at line 85 of file PubmedArticle.cpp.

References locale, and str().

Referenced by s_GetInitialsFromForeName().

◆ s_TranslateMonth()

static int s_TranslateMonth ( const string month_str)

Definition at line 107 of file PubmedArticle.cpp.

References s_StringToInt().

Referenced by s_GetPubmedDate().

◆ s_Utf8TextListToString()

template<class TE >
string s_Utf8TextListToString ( const list< CRef< TE >> &  text_list)


USING_SCOPE ( objects  )

◆ utf8_to_string()

static string utf8_to_string ( const string str)

Variable Documentation



Definition at line 73 of file PubmedArticle.cpp.



Definition at line 740 of file PubmedArticle.cpp.



Definition at line 63 of file PubmedArticle.cpp.



Definition at line 64 of file PubmedArticle.cpp.

Modified on Thu Jun 13 17:25:29 2024 by rev. 669887