64 if (!empty_ok && list_author_list.empty())
return auth_list;
65 if (!empty_ok && all_of(list_author_list.begin(), list_author_list.end(),
67 return author_list_element->GetAuthor().empty(); }))
return auth_list;
69 bool std_format = any_of(list_author_list.begin(), list_author_list.end(),
71 auto list_author = author_list_element->GetAuthor();
72 bool attr_editors = author_list_element->GetAttlist().IsSetType() &&
73 author_list_element->GetAttlist().GetType() == CAuthorList::C_Attlist::eAttlist_Type_editors;
74 return attr_editors || any_of( list_author.begin(), list_author.end(),
75 [](const CRef<CAuthor>& author_element) -> bool { return author_element->GetLC().IsCollectiveName(); } );
78 if (!std_format) auth_names->SetMl();
79 for (
const auto& author_list_element : list_author_list) {
80 for (
const auto& author_element : author_list_element->GetAuthor() ) {
82 if (author_element->GetLC().IsCollectiveName()) {
86 auth->SetName(*person);
88 auth->SetRole(objects::CAuthor::eRole_editor);
89 auth_names->SetStd().push_back(auth);
94 person->SetMl(medline_name);
96 auth->SetName(*person);
98 auth->SetRole(objects::CAuthor::eRole_editor);
99 auth_names->SetStd().push_back(auth);
102 auth_names->SetMl().push_back(medline_name);
108 auth_list->SetNames(*auth_names);
120 title->
Set().push_back(name);
121 if (book.IsSetIsbn()) {
122 for (
const auto& isbn_element : book.GetIsbn()) {
125 title->
Set().push_back(name);
168 const auto& book = book_document.
GetBook();
172 if (book.IsSetVolume()) {
175 if (book_document.IsSetPagination()) {
178 const auto& list_language = book_document.GetLanguage();
179 if (!list_language.empty()) {
180 string langiages = accumulate(
next(list_language.begin()), list_language.end(), (*list_language.begin())->Get(),
181 [](
const string& x,
const CRef<CLanguage>& e) ->
string { return x +
"," + e->Get(); } );
185 if (book_data.IsSetHistory()) {
187 for (
const auto& pub_date : book_data.GetHistory().GetPubMedPubDate()) {
189 pub_stat_date->SetPubstatus(
s_GetPubStatus(pub_date->GetAttlist().GetPubStatus()));
191 date_set->
Set().push_back(pub_stat_date);
208 title->
Set().push_back(name);
232 from->SetBook(*
s_GetBook(pubmed_article));
244 auto created_date_element = find_if(dates.begin(), dates.end(),
246 return date_element->GetAttlist().GetPubStatus() == CPubMedPubDate::C_Attlist::eAttlist_PubStatus_entrez; });
247 if (created_date_element != dates.end())
267 return medline_entry;
279 NStr::StringToNumeric<TEntrezId>(
GetBookDocument().GetPMID().GetPMID())));
#define BEGIN_eutils_SCOPE
static string s_GetAbstractText(const CAbstract &abstr)
static EPubStatus s_GetPublicationStatusId(const string &publication_status)
User-defined methods of the data storage class.
ncbi::CRef< ncbi::objects::CArticleIdSet > s_GetArticleIdSet(const CArticleIdList &article_id_list, const CArticle *article)
void s_FillGrants(std::list< std::string > &id_nums, const CGrantList &grant_list)
std::string s_GetPagination(const CPagination &pagination)
ncbi::CRef< ncbi::objects::CDate > s_GetDateFromPubDate(const CPubDate &pub_date)
ncbi::CRef< ncbi::objects::CDate > s_GetDateFromPubMedPubDate(const CPubMedPubDate &pdate)
std::string s_TextListToString(const std::list< ncbi::CRef< TE >> &text_list)
ncbi::CRef< ncbi::objects::CTitle > s_GetTitle(const D &doc)
std::string s_CleanupText(std::string str)
std::string s_GetAuthorMedlineName(const CAuthor &author)
static int s_GetPubStatus(CPubMedPubDate::C_Attlist::EAttlist_PubStatus status)
static CRef< CMedline_entry > s_GetMedlineEntry(const CPubmedBookArticle &pubmed_article)
static CRef< CTitle > s_GetBookTitle(const CPubmedBookArticle &pubmed_article)
static CRef< CImprint > s_GetImprint(const CPubmedBookArticle &pubmed_article)
static CRef< CCit_art > s_GetCitation(const CPubmedBookArticle &pubmed_article)
static CRef< CAuth_list > s_GetAuthorList(const CBookDocument::TAuthorList &list_author_list, bool empty_ok)
static CRef< CCit_book > s_GetBook(const CPubmedBookArticle &pubmed_article)
BEGIN_eutils_SCOPE NCBI_USING_NAMESPACE_STD
User-defined methods of the data storage class.
@Auth_list.hpp User-defined methods of the data storage class.
ncbi::CRef< ncbi::objects::CPubmed_entry > ToPubmed_entry(void) const
~CPubmedBookArticle(void)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
void SetPages(const TPages &value)
Assign a value to Pages data member.
void SetIds(TIds &value)
Assign a value to Ids data member.
void SetTitle(TTitle &value)
Assign a value to Title data member.
void SetTitle(TTitle &value)
Assign a value to Title data member.
void SetFrom(TFrom &value)
Assign a value to From data member.
void SetLanguage(const TLanguage &value)
Assign a value to Language data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
void SetColl(TColl &value)
Assign a value to Coll data member.
void SetImp(TImp &value)
Assign a value to Imp data member.
void SetVolume(const TVolume &value)
Assign a value to Volume data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
void SetDate(TDate &value)
Assign a value to Date data member.
void SetHistory(THistory &value)
Assign a value to History data member.
void SetPubstatus(TPubstatus value)
Assign a value to Pubstatus data member.
Tdata & Set(void)
Assign a value to data member.
Tdata & Set(void)
Assign a value to data member.
@ ePubStatus_pubmed
article citation first appeared in PubMed
@ ePubStatus_accepted
accepted for publication
@ ePubStatus_ppublish
published in print by publisher
@ ePubStatus_premedline
date into PreMedline status
@ ePubStatus_revised
article revised by publisher/author
@ ePubStatus_received
date manuscript received for review
@ ePubStatus_pubmedr
article citation revision in PubMed
@ ePubStatus_aheadofprint
epublish, but will be followed by print
@ ePubStatus_medline
date made a MEDLINE record
@ ePubStatus_epublish
published electronically by publisher
@ ePubStatus_pmc
article first appeared in PubMed Central
@ ePubStatus_pmcr
article revision in PubMed Central
void SetEm(TEm &value)
Assign a value to Em data member.
TIdnum & SetIdnum(void)
Assign a value to Idnum data member.
void SetStatus(TStatus value)
Assign a value to Status data member.
void SetCit(TCit &value)
Assign a value to Cit data member.
void SetAbstract(const TAbstract &value)
Assign a value to Abstract data member.
void SetPmid(const TPmid &value)
Assign a value to Pmid data member.
@ eStatus_publisher
record as supplied by publisher
const TAuthorList & GetAuthorList(void) const
Get the AuthorList member data.
const TCollectionTitle & GetCollectionTitle(void) const
Get the CollectionTitle member data.
const TBook & GetBook(void) const
Get the Book member data.
bool IsSetHistory(void) const
Check if a value has been assigned to History data member.
const TPMID & GetPMID(void) const
Get the PMID member data.
const TPMID & GetPMID(void) const
Get the PMID member data.
const TPubDate & GetPubDate(void) const
Get the PubDate member data.
const TGrantList & GetGrantList(void) const
Get the GrantList member data.
bool IsSetGrantList(void) const
Check if a value has been assigned to GrantList data member.
const TAuthorList & GetAuthorList(void) const
Get the AuthorList member data.
const TPubmedBookData & GetPubmedBookData(void) const
Get the PubmedBookData member data.
const TPubMedPubDate & GetPubMedPubDate(void) const
Get the PubMedPubDate member data.
const THistory & GetHistory(void) const
Get the History member data.
bool IsSetAbstract(void) const
Check if a value has been assigned to Abstract data member.
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CAuthorList > > TAuthorList
const TCollectionTitle & GetCollectionTitle(void) const
Get the CollectionTitle member data.
const TArticleIdList & GetArticleIdList(void) const
Get the ArticleIdList member data.
const TAbstract & GetAbstract(void) const
Get the Abstract member data.
bool IsSetCollectionTitle(void) const
Check if a value has been assigned to CollectionTitle data member.
const TBookDocument & GetBookDocument(void) const
Get the BookDocument member data.
@ eAttlist_PubStatus_premedline
@ eAttlist_PubStatus_epublish
@ eAttlist_PubStatus_revised
@ eAttlist_PubStatus_aheadofprint
@ eAttlist_PubStatus_accepted
@ eAttlist_PubStatus_received
@ eAttlist_PubStatus_medline
@ eAttlist_PubStatus_pubmed
@ eAttlist_PubStatus_pmcr
@ eAttlist_PubStatus_ppublish
@ eAttlist_PubStatus_pubmedr