& error_sub_code_str = err_category->second.m_sub_errors.find(err_sub_code);
137 if(error_sub_code_str != err_category->second.m_sub_errors.end()) {
138ret = err_category->second.m_error_str;
140ret += error_sub_code_str->second;
156cit_art.
SetAuthors().ConvertMlToStd(
true);
166 if(
journal.GetImp().IsSetLanguage() &&
journal.GetImp().GetLanguage() ==
"Eng")
167 journal.SetImp().ResetLanguage();
177 if(medlines.size() != 1) {
181 CPub& pub = *medlines.front();
203medlines.push_back(pmid);
206medlines.push_back(cit_art);
235 static const size_tISSN_SIZE = 9;
236 static const size_tISSN_DASH_POS = 4;
237 static const size_tISSN_X_POS = 8;
243 for(
size_t i= 0;
i< ISSN_SIZE; ++
i) {
245 if(
isdigit(ch) || (ch ==
'-'&&
i== ISSN_DASH_POS) || (ch ==
'X'&&
i== ISSN_X_POS)) {
321 for(
intretry=0; retry<10; ++retry) {
324 autopRes =
Ref(
newesearch::CESearchResult());
327 if(istr.GetStatusCode() == 200) {
328 if(pRes->IsSetData()) {
329 if(pRes->GetData().IsInfo() &&
330pRes->GetData().GetInfo().IsSetContent() &&
331pRes->GetData().GetInfo().GetContent().IsSetIdList()) {
333 const auto& idList = pRes->GetData().GetInfo().GetContent().GetIdList();
334 if(idList.IsSetId()) {
335ids = idList.GetId();
341 if(pRes->GetData().IsERROR()) {
343pRes->GetData().GetERROR());
354 intsleepSeconds =
int(sqrt(retry));
361 "failed to execute query: "+ term);
366 const string&
id) {
373 boolsuccess=
false;
374 for(
intretry=0; retry<10; ++retry) {
378 if(istr.GetStatusCode() == 200) {
387 intsleepSeconds =
int(sqrt(retry));
395 "failed to execute esummary request: "+ request.
GetQueryString());
398 static const stringindexingElement {
"<CurrentIndexingStatus>Y</CurrentIndexingStatus>"};
400 if(firstPos ==
NPOS) {
405 returnfirstPos == lastPos;
445 for(
const string&
id: ids) {
471last_name = namestd.
GetLast();
490 const CImprint* imprint =
nullptr;
491 const CTitle* title =
nullptr;
513imprint = &book.
GetImp();
518 static const stringUNKNOWN_JOURNAL(
"journal unknown");
519 stringtitle_str(UNKNOWN_JOURNAL);
521 if(title && title->
IsSet() && !title->
Get().empty()) {
524 const string&
str= title->
GetTitle(first_title);
531 static const stringNO_PAGE(
"no page number");
532 static const stringNO_VOL(
"no volume number");
538 boolin_press =
false;
558ostr << last_name <<
" "<< first_name <<
"|"<< title_str <<
"|("<< year <<
")|"<< vol <<
"|"<< page;
559 const stringtail = ostr.str();
563 "Too many author name differences: "<< muid <<
"|"<< tail);
570 static const intYEAR_MAX_DIFF = 2;
572 if(year && cur_year - year > YEAR_MAX_DIFF) {
574 "encountered in-press article more than "<< YEAR_MAX_DIFF <<
" years old: "<< tail);
580muid <<
"|"<< tail);
585 ">>"<< muid <<
"<<|"<< tail);
595 ">>"<< muid <<
"<<|"<< tail);
626 autoStrNotEmpty = [](
const string&
str) ->
bool{
return!
str.empty(); };
627 size_tnew_num_of_authors = count_if(new_names.
GetStr().begin(), new_names.
GetStr().end(), StrNotEmpty),
628num_of_authors = count_if(old_names.
GetStr().begin(), old_names.
GetStr().end(), StrNotEmpty);
631 for(
const string& name : old_names.
GetStr()) {
640 size_tmin_num_of_authors =
min(num_of_authors, new_num_of_authors);
646 static const size_tMAX_AUTHORS = 10;
647 if(min_num_of_authors > MAX_AUTHORS) {
656 size_tnum_of_names = 0;
658 for(
const auto& name :
names)
667extracted.push_back(cur_consortium);
678 if(!consortia.empty()) {
682 for(
const auto& pAuthor : authors) {
684pAuthor->IsSetName() &&
685pAuthor->GetName().IsConsortium()) {
686consortia.push_back(pAuthor->GetName().GetConsortium());
690 if(!consortia.empty()) {
707 if(x.size() != y.size()) {
713 for(
autoxit = begin(x); xit != end(x); ++xit, ++yit) {
720 if(xval_starts_with_the && !yval_starts_with_the) {
726 else if(yval_starts_with_the && !xval_starts_with_the) {
755list<string> old_consortia;
760list<string> new_consortia;
762 autoold_consortia_string =
NStr::Join(old_consortia,
";");
764 "Publication as returned by MedArch lacks consortium authors of the original publication : \"" 765<< old_consortia_string <<
"\".");
767 auto& std_list = new_cit.
SetAuthors().SetNames().SetStd();
770back_inserter(std_list),
771[](
const string& consortium) {
773pAuthor->SetName().SetConsortium(consortium);
777 autoold_consortia_string =
NStr::Join(old_consortia,
";");
778 autonew_consortia_string =
NStr::Join(new_consortia,
";");
780 "Consortium author names differ. Original is \"" 781<< old_consortia_string
782<<
"\". MedArch's is \"" 783<< new_consortia_string <<
"\".");
791 static const size_tMAX_EXTRACTED = 10;
792 size_textracted = 0;
794 for(
const auto& name :
names) {
795 if(name->IsSetName() && name->GetName().IsName() && name->GetName().GetName().IsSetLast()) {
796res.push_back(name->GetName().GetName().GetLast());
799 if(extracted == MAX_EXTRACTED) {
831 if(!old_consortiums.empty()) {
833 stringold_cons_list =
NStr::Join(old_consortiums,
";");
834 if(new_consortiums.empty()) {
837 "Publication as returned by MedArch lacks consortium authors of the original publication : \""<< old_cons_list <<
"\".");
839for_each(old_consortiums.begin(), old_consortiums.end(),
840[&new_cit](
const string& consortium) {
842CRef<CAuthor> auth(new CAuthor);
843auth->SetName().SetConsortium(consortium);
845new_cit.SetAuthors().SetNames().SetStd().push_front(auth);
850 stringnew_cons_list =
NStr::Join(new_consortiums,
";");
853 "Consortium author names differ. Original is \""<< old_cons_list <<
"\". MedArch's is \""<< new_cons_list <<
"\".");
857 if(num_names == 0) {
862list<CTempString> new_author_names;
872 if(find_if(new_author_names.begin(), new_author_names.end(),
875return NStr::EqualNocase(last_name, cur_name);
876}) != new_author_names.end()) {
883 size_tmin_num_names =
min(num_names, new_author_names.size());
888 boolreplace_authors = new_num_names == 0;
889 if(!replace_authors && new_num_names < num_names) {
917 if(!replace_authors)
919 static const intMIN_FIRST_AUTHORS_THRESHOLD_1995 = 10;
920 static const intMAX_FIRST_AUTHORS_THRESHOLD_1995 = 12;
922 static const intMIN_SECOND_AUTHORS_THRESHOLD_1999 = 25;
923 static const intMAX_SECOND_AUTHORS_THRESHOLD_1999 = 27;
925replace_authors = (new_num_names < MAX_FIRST_AUTHORS_THRESHOLD_1995 && num_names > MIN_FIRST_AUTHORS_THRESHOLD_1995) ||
926(new_num_names < MAX_SECOND_AUTHORS_THRESHOLD_1999 && num_names > MIN_SECOND_AUTHORS_THRESHOLD_1999);
930 if(replace_authors) {
946 for(
const auto& cur_id : old_ids.
Get()) {
948 if(!cur_id->IsDoi() && !cur_id->IsOther()) {
955 auto& new_ids = cit_new.
GetIds().
Get();
956found = find_if(new_ids.begin(), new_ids.end(),
959if (cur_id->Which() != new_id->Which()) {
967 boolres = cur_id->GetOther().IsSetDb() == new_id->
GetOther().
IsSetDb();
968 if(res && cur_id->GetOther().IsSetDb()) {
969res = cur_id->GetOther().GetDb() == new_id->GetOther().GetDb();
976cit_new.
SetIds().Set().push_front(cur_id);
995 if(!
journal.GetImp().IsSetVolume() || !
journal.GetImp().IsSetPages() || !
journal.GetImp().IsSetDate()) {
1018imprint = &cit_art.
SetFrom().SetJournal().SetImp();
1024imprint = &cit_art.
SetFrom().SetBook().SetImp();
1030imprint = &cit_art.
SetFrom().SetProc().SetBook().SetImp();
1054 if(pub_equiv.
IsSet()) {
1055 for(
auto& pub : pub_equiv.
Set())
1057 if(pub->IsMuid()) {
1058muids.push_back(pub);
1060 else if(pub->IsPmid()) {
1061pmids.push_back(pub);
1063 else if(pub->IsArticle()) {
1065others.push_back(pub);
1068cit_arts.push_back(pub);
1071 else if(pub->IsMedline()) {
1072medlines.push_back(pub);
1075others.push_back(pub);
1080 auto& pub_list = pub_equiv.
Set();
1083 if((!muids.empty() || !pmids.empty()) && !m_always_lookup) {
1085pub_list.splice(pub_list.end(), cit_arts);
1086pub_list.splice(pub_list.end(), muids);
1087pub_list.splice(pub_list.end(), pmids);
1088pub_list.splice(pub_list.end(), medlines);
1089pub_list.splice(pub_list.end(), others);
1093pub_list.splice(pub_list.end(), others);
1095 if(!medlines.empty())
1097 if(medlines.size() > 1) {
1103pub_list.splice(pub_list.end(), medlines);
1107 if(!pmids.empty()) {
1109oldpmid = pmids.front()->GetPmid();
1112 for(
const auto& pub : pmids) {
1113 if(pub->GetPmid() != oldpmid) {
1115 "Two different pmids in Pub-equiv ["<< oldpmid <<
"] ["<< pub->GetPmid() <<
"]");
1122 if(!muids.empty()) {
1124oldmuid = muids.front()->GetMuid();
1127 for(
const auto& pub : muids) {
1128 if(pub->GetMuid() != oldmuid) {
1130 "Two different muids in Pub-equiv ["<< oldmuid <<
"] ["<< pub->GetMuid() <<
"]");
1136 if(!cit_arts.empty()) {
1137 if(cit_arts.size() > 1) {
1143 CCit_art* cit_art = &cit_arts.front()->SetArticle();
1152pmid = m_upd->CitMatch(*new_pub);
1165 "OldPMID="<< oldpmid <<
" doesn't match lookup ("<< pmid <<
"). Keeping lookup.");
1168 boolset_pmid =
true;
1169 if(m_replace_cit) {
1175 boolnew_cit_is_valid(
false);
1180new_cit_is_valid =
true;
1185new_cit_is_valid =
true;
1188new_cit_is_valid =
false;
1191 throwlogic_error(
"Invalid outcome returned by CAuthListValidator::validate(): "+ std::to_string(outcome));
1198 if(new_cit_is_valid) {
1199 if(pmids.empty()) {
1201pmids.push_back(pmid_pub);
1204pmids.front()->SetPmid().Set(pmid);
1205pub_list.splice(pub_list.end(), pmids);
1209pub_list.push_back(cit_pub);
1216cit_arts.push_back(cit_pub);
1217cit_art = new_cit_art;
1223pub_list.splice(pub_list.end(), cit_arts);
1230 "Failed to get pub from MedArch server for pmid = "<< pmid <<
". Input one is preserved.");
1235 if(pmids.empty()) {
1237pmids.push_back(pmid_pub);
1240pmids.front()->SetPmid().Set(pmid);
1241pub_list.splice(pub_list.end(), pmids);
1245pub_list.splice(pub_list.end(), cit_arts);
1254pub_list.splice(pub_list.end(), cit_arts);
1266pub_list.splice(pub_list.end(), pmids);
1268 if(m_replace_cit) {
1272pub_list.push_back(cit_pub);
1278 "Cant find article for pmid ["<< oldpmid <<
"]");
1282pub_list.splice(pub_list.end(), pmids);
1285pub_list.splice(pub_list.end(), muids);
1293 switch(pub.
Which()) {
1299pub_equiv->
Set().front()->Assign(pub);
1316pmid = m_upd->CitMatch(pub);
1324 if(m_replace_cit) {
1373pub = upd->
GetPub(pmid);
1396enabled = cfg.
GetBool(section,
"enabled", enabled);
1397cfg_matched_to_min = cfg.
GetDouble(section,
"matched_to_min", cfg_matched_to_min);
1398cfg_removed_to_gb = cfg.
GetDouble(section,
"removed_to_gb", cfg_removed_to_gb);
1403: outcome(
eNotSet), pub_year(0), reported_limit(
"not initialized"), m_err_log(err_log)
1415 if(pub_year < 1900 || pub_year > 3000) {
1416 throwlogic_error(
"Publication from PubMed has invalid year: "+ std::to_string(
pub_year));
1432 "Too many authors removed ("<<
cnt_removed<<
") compared to total Genbank authors ("<<
cnt_gb<<
")");
1443 "Preserving original "<<
cnt_gb<<
" GB authors, ignoring "<<
cnt_pm<<
" PubMed authors " 1455 "Preserving original "<<
cnt_gb<<
" GB authors, ignoring "<<
cnt_pm<<
" PubMed authors " 1466 "Only "<<
cnt_matched<<
" authors matched between "<<
cnt_gb<<
" Genbank and " 1476 out<<
"\n--- Debug Dump of CAuthListValidator object ---\n";
1483 out<<
"GB author list type: "<<
gb_type<<
"; # of entries: "<<
cnt_gb<<
"\n";
1484 out<<
"PM author list type: "<<
pm_type<<
"; # of entries: "<<
cnt_pm<<
"\n";
1488 const char* outcome_names[] = {
"NotSet",
"Failed_validation",
"Accept_pubmed",
"Keep_genbank"};
1489 out<<
"Outcome reported: "<< outcome_names[
outcome] <<
"("<<
outcome<<
")\n";
1490 out<<
"--- End of Debug Dump of CAuthListValidator object ---\n\n";
1495 out<< lst.size() <<
" "<< hdr <<
" authors:\n";
1496 for(
const string&
a: lst)
1497 out<<
" "<<
a<<
"\n";
1503 while(gbit !=
removed.end()) {
1504list<string>::iterator gbnext(gbit);
1506list<string>::iterator pmit = std::find(
added.begin(),
added.end(), *gbit);
1507 if(pmit !=
added.end()) {
1533authlist_std->
Assign(authors);
1549 for(
const auto& name : authors) {
1550 if(name->IsSetName() && name->GetName().IsName() && name->GetName().GetName().IsSetLast()) {
1551 stringlname(name->GetName().GetName().GetLast());
1559 const char* alpha =
"abcdefghijklmnopqrstuvwxyz";
1560 for(
stringauth : authors) {
1562lastnames.push_back(auth.substr(0, eow));
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void transform(Container &c, UnaryFunction *op)
IMessageListener * m_err_log
void DebugDump(CNcbiOstream &out) const
static double cfg_matched_to_min
double actual_matched_to_min
static void get_lastnames(const CAuth_list &authors, list< string > &lastnames, string &auth_string)
EOutcome validate(const CCit_art &gb_art, const CCit_art &pm_art)
CAuthListValidator(IMessageListener *err_log)
static void Configure(const CNcbiRegistry &cfg, const string §ion)
static double cfg_removed_to_gb
double actual_removed_to_gb
void dumplist(const char *hdr, const list< string > &lst, CNcbiOstream &out) const
@Auth_list.hpp User-defined methods of the data storage class.
void ConvertMlToStandard(bool normalize_suffix=false)
This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...
CRef< CPub > GetPub(TEntrezId pmid, EPubmedError *=nullptr)
@Name_std.hpp User-defined methods of the data storage class.
static CNcbiApplication * Instance(void)
Singleton method.
static CRef< CCit_art > FetchPubPmId(TEntrezId pmid, CEUtilsUpdater *)
void FixPubEquiv(CPub_equiv &pub_equiv)
static string GetErrorId(int code, int subcode)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
const string & GetTitle(C_E::E_Choice type=C_E::e_not_set) const
If the internal list contains a title (of the specified type, if given), returns the corresponding st...
User-defined methods of the data storage class.
std::ofstream out("events_result.xml")
main entry point for tests
CRef< CCit_art > FetchPubPmId(TEntrezId pmid)
static const struct name_t names[]
static const char * str(char *buf, int n)
SStrictId_Entrez::TId TEntrezId
TEntrezId type for entrez ids which require the same strictness as TGi.
#define ENTREZ_ID_TO(T, entrez_id)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
@ eDiag_Info
Informational message.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
virtual string GetQueryString(void) const
Get CGI script query string.
const CEUtils_IdGroup & GetId(void) const
Group of ids required if history is not used.
CNcbiIostream & GetStream(void)
Get input stream for reading plain data.
void SetArgument(const string &name, const string &value)
Add/change custom argument. Remove the argument if the value is empty.
void AddId(const string &id)
Add a single id to the list.
void SetUseHistory(bool value)
void SetRetMax(int retmax)
void Disconnect(void)
Close connection, destroy the stream.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
virtual bool GetBool(const string §ion, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
virtual double GetDouble(const string §ion, const string &name, double default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get double value of specified parameter name.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
size_t NcbiStreamToString(string *s, CNcbiIstream &is, size_t pos=0)
Input the entire contents of an istream into a string (NULL causes drain).
static CTempString TruncateSpaces_Unsafe(const CTempString str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
PNocase_Generic< string > PNocase
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static string Sanitize(CTempString str, TSS_Flags flags=fSS_print)
Sanitize a string, allowing only specified classes of characters.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static void TrimPrefixInPlace(string &str, const CTempString prefix, ECase use_case=eCase)
Trim prefix from a string (in-place)
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eReverseSearch
Search in a backward direction.
@ eTrunc_Begin
Truncate leading whitespace only.
@ eNocase
Case insensitive compare.
@ eCurrent
Use current time. See also CCurrentTime.
bool IsProc(void) const
Check if variant Proc is selected.
const TTitle & GetTitle(void) const
Get the Title member data.
bool IsSetVolume(void) const
Check if a value has been assigned to Volume data member.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
bool IsDoi(void) const
Check if variant Doi is selected.
void SetIds(TIds &value)
Assign a value to Ids data member.
const TBook & GetBook(void) const
Get the Book member data.
bool IsSetAuthors(void) const
authors (ANSI requires) Check if a value has been assigned to Authors data member.
const TJournal & GetJournal(void) const
Get the variant data.
bool IsSetTitle(void) const
title of journal Check if a value has been assigned to Title data member.
const TVolume & GetVolume(void) const
Get the Volume member data.
const TPages & GetPages(void) const
Get the Pages member data.
bool IsSetPrepub(void) const
Check if a value has been assigned to Prepub data member.
const TFrom & GetFrom(void) const
Get the From member data.
bool IsSetTitle(void) const
Title of book Check if a value has been assigned to Title data member.
void SetFrom(TFrom &value)
Assign a value to From data member.
const TOther & GetOther(void) const
Get the variant data.
bool IsSetFrom(void) const
Check if a value has been assigned to From data member.
void SetAuthors(TAuthors &value)
Assign a value to Authors data member.
bool IsSetImp(void) const
Check if a value has been assigned to Imp data member.
TPrepub GetPrepub(void) const
Get the Prepub member data.
const TName & GetName(void) const
Get the Name member data.
const TProc & GetProc(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
list< CRef< CAuthor > > TStd
const Tdata & Get(void) const
Get the member data.
bool IsSetNames(void) const
Check if a value has been assigned to Names data member.
void ResetAuthors(void)
Reset Authors data member.
bool IsSetDate(void) const
date of publication Check if a value has been assigned to Date data member.
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
const TStr & GetStr(void) const
Get the variant data.
bool IsSetIds(void) const
lots of ids Check if a value has been assigned to Ids data member.
bool IsSet(void) const
Check if a value has been assigned to data member.
bool IsBook(void) const
Check if variant Book is selected.
const TImp & GetImp(void) const
Get the Imp member data.
bool IsSetBook(void) const
citation to meeting Check if a value has been assigned to Book data member.
bool IsJournal(void) const
Check if variant Journal is selected.
const TNames & GetNames(void) const
Get the Names member data.
const TStd & GetStd(void) const
Get the variant data.
const TIds & GetIds(void) const
Get the Ids member data.
const TDate & GetDate(void) const
Get the Date member data.
void SetPrepub(TPrepub value)
Assign a value to Prepub data member.
const TAuthors & GetAuthors(void) const
Get the Authors member data.
const TTitle & GetTitle(void) const
Get the Title member data.
const TImp & GetImp(void) const
Get the Imp member data.
bool IsSetPages(void) const
Check if a value has been assigned to Pages data member.
const Tdata & Get(void) const
Get the member data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetImp(void) const
Check if a value has been assigned to Imp data member.
bool IsStd(void) const
Check if variant Std is selected.
const TBook & GetBook(void) const
Get the variant data.
@ ePrepub_in_press
accepted, not published
@ e_Ml
MEDLINE, semi-structured.
bool IsConsortium(void) const
Check if variant Consortium is selected.
bool IsSetDb(void) const
name of database or system Check if a value has been assigned to Db data member.
bool IsSetYear(void) const
full year (including 1900) Check if a value has been assigned to Year data member.
bool IsStd(void) const
Check if variant Std is selected.
const TInitials & GetInitials(void) const
Get the Initials member data.
bool IsName(void) const
Check if variant Name is selected.
bool IsSetInitials(void) const
first + middle initials Check if a value has been assigned to Initials data member.
bool IsSetLast(void) const
Check if a value has been assigned to Last data member.
const TConsortium & GetConsortium(void) const
Get the variant data.
TYear GetYear(void) const
Get the Year member data.
const TLast & GetLast(void) const
Get the Last member data.
const TName & GetName(void) const
Get the variant data.
const TStd & GetStd(void) const
Get the variant data.
void SetCit(TCit &value)
Assign a value to Cit data member.
bool IsSetCit(void) const
article citation Check if a value has been assigned to Cit data member.
bool IsSetPmid(void) const
MEDLINE records may include the PubMedId Check if a value has been assigned to Pmid data member.
const TPmid & GetPmid(void) const
Get the Pmid member data.
TPmid & SetPmid(void)
Select the variant.
list< CRef< CPub > > Tdata
Tdata & Set(void)
Assign a value to data member.
const TArticle & GetArticle(void) const
Get the variant data.
bool IsSet(void) const
Check if a value has been assigned to data member.
TEquiv & SetEquiv(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
TMedline & SetMedline(void)
Select the variant.
bool IsArticle(void) const
Check if variant Article is selected.
TArticle & SetArticle(void)
Select the variant.
@ e_Equiv
to cite a variety of ways
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
bool TenAuthorsProcess(CCit_art &cit, CCit_art &new_cit, IMessageListener *err_log)
bool IsFromBook(const CCit_art &art)
static void s_TrimPrefixThe(CTempString &str)
static bool s_GetConsortia(const list< CRef< CAuthor >> &authors, list< string > &consortia)
void MergeNonPubmedPubIds(const CCit_art &cit_old, CCit_art &cit_new)
static void s_GetESearchIds(CESearch_Request &req, const string &term, list< string > &ids)
bool IsInpress(const CCit_art &cit_art)
bool TenAuthorsCompare(CCit_art &cit_old, CCit_art &cit_new)
bool MUIsJournalIndexed(const string &journal)
static const size_t MAX_MATCH_COEFF
static bool s_ConsortiaMatch(const list< string > &x, const list< string > &y)
bool MULooksLikeISSN(const string &str)
void GetFirstTenNames(const CAuth_list::C_Names::TStd &names, list< CTempString > &res)
bool NeedToPropagateInJournal(const CCit_art &cit_art)
@ err_Reference_DiffConsortAuthors
@ err_Reference_No_reference
@ err_Reference_MedlineMatchIgnored
@ err_Reference_PmidNotFound
@ err_Reference_Multiple_pmid
@ err_Reference_NoConsortAuthors
@ err_Reference_SuccessfulMuidLookup
@ err_Reference_SuccessfulPmidLookup
@ err_Reference_Multiple_ref
@ err_Reference_NoPmidJournalNotInPubMed
@ err_Reference_Multiple_muid
@ err_Reference_NoPmidJournalNotInPubMedInPress
@ err_Reference_PmidNotFoundInPress
@ err_Reference_MuidNotFound
@ err_Reference_MedArchMatchIgnored
@ err_Reference_MuidMissmatch
@ err_Reference_OldInPress
@ err_Reference_PmidMissmatch
@ err_Reference_FailedToGetPub
void MedlineToISO(CCit_art &cit_art)
static map< int, SErrorSubcodes > ERROR_CODE_STR
static bool s_IsIndexed(CRef< CEUtils_ConnContext > pContext, const string &id)
static void s_ProcessConsortia(const CCit_art &old_cit, CCit_art &new_cit, IMessageListener *pListener)
void PropagateInPress(bool inpress, CCit_art &cit_art)
@ err_AuthList_PreserveGB
@ err_AuthList_SignificantDrop
void SplitMedlineEntry(CPub_equiv::Tdata &medlines)
void PrintPub(const CCit_art &cit_art, bool found, bool auth, long muid, IMessageListener *err_log)
static void MoveAuthors(CCit_art &to, CCit_art &from)
size_t ExtractConsortiums(const CAuth_list::C_Names::TStd &names, CAuth_list::C_Names::TStr &extracted)
IMessage/IMessageListener interfaces and basic implementations.
void SleepSec(unsigned long sec, EInterruptOnSignal onsignal=eRestartOnSignal)
Sleep.
User-defined methods of the data storage class.
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
#define ERR_POST_TO_LISTENER(listener, severity, code, subcode, message)
CRef< CPub > journal(ParserPtr pp, char *bptr, char *eptr, CRef< CAuth_list > &auth_list, CRef< CTitle::C_E > &title, bool has_muid, CRef< CCit_art > &cit_art, Int4 er)
map< int, string > m_sub_errors
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4