74 const string* title2 = 0;
75 const string* titleunique = 0;
76 bool unpublished =
false;
97 if (!title && !authors && !
IsSetTitle() && !volume &&
104 cit.resize(cit.find_last_of(
'|'));
105 }
catch(length_error&) {}
113 authors, 0, title, 0, 0, 0, title2, titleunique,
114 date_ptr, volume, issue, pages, unpublished);
129 *
label +=
"Unpublished";
135 *
label +=
"Unpublished ";
160 pos =
GetCit().find(
"Journal=\"");
168 inpress =
"Unpublished";
170 }
else if (
SWNC(
GetCit(),
"Online Publication")
171 ||
SWNC(
GetCit(),
"Published Only in DataBase")
191 pos =
journal.find_first_of(
"=\"");
210 *
label +=
", " + pages;
212 *
label +=
':' + pages;
217 *
label +=
' ' + year;
@Auth_list.hpp User-defined methods of the data storage class.
bool GetLabelV1(string *label, TLabelFlags flags) const override
bool GetLabelV2(string *label, TLabelFlags flags) const override
void GetDate(string *label, bool year_only=false) const
Append a standardized string representation of the date to the label.
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...
@ eLabel_V2
New implementation, in line with GenBank/GenPept REFERENCE JOURNAL fields and the like.
int TLabelFlags
binary OR of ELabelFlags
@ fLabel_FlatEMBL
For EMBL or EMBLPept [V2].
@ fLabel_NoUnpubAffil
No affil on unpublished Cit-gen [V2].
@ fLabel_NoBadCitGen
Ignore "bad" Cit-gen data [V2].
@ fLabel_FlatNCBI
For GenBank or GenPept [V2].
@ fLabel_Unique
Append a unique tag [V1].
static string GetParenthesizedYear(const CDate &date)
static string FixPages(const string &orig_pages)
Canonicalize a range of page numbers, expanding Medline-style 125-35 -> 125-135, F124-34 -> F124-F134...
static bool HasText(const string &s)
static bool SWNC(const string &str, const string &pfx)
static bool x_GetLabelV1(string *label, bool unique, const CAuth_list *authors, const CImprint *imprint, const CTitle *title, const CCit_book *book, const CCit_jour *journal, const string *title1=0, const string *title2=0, const string *titleunique=0, const string *date=0, const string *volume=0, const string *issue=0, const string *pages=0, bool unpublished=false)
bool GetLabel(string *label, TLabelFlags flags=0, ELabelVersion version=eLabel_DefaultVersion) const override
Append a label to the specified string per the specified flags.
static void MaybeAddSpace(string *label)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string (in-place)
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
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 enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string.
@ eTrunc_End
Truncate trailing spaces only.
static const char label[]
bool IsSetPages(void) const
Check if a value has been assigned to Pages data member.
const TIssue & GetIssue(void) const
Get the Issue member data.
bool IsSetDate(void) const
Check if a value has been assigned to Date data member.
TSerial_number GetSerial_number(void) const
Get the Serial_number member data.
bool CanGetJournal(void) const
Check if it is safe to call GetJournal method.
bool IsSetAuthors(void) const
Check if a value has been assigned to Authors data member.
bool IsSetVolume(void) const
Check if a value has been assigned to Volume data member.
const TPages & GetPages(void) const
Get the Pages member data.
const TAuthors & GetAuthors(void) const
Get the Authors member data.
const TCit & GetCit(void) const
Get the Cit member data.
bool IsSetSerial_number(void) const
for GenBank style references Check if a value has been assigned to Serial_number data member.
const TAffil & GetAffil(void) const
Get the Affil member data.
const TDate & GetDate(void) const
Get the Date member data.
bool CanGetPages(void) const
Check if it is safe to call GetPages method.
bool IsSetCit(void) const
anything, not parsable Check if a value has been assigned to Cit data member.
bool CanGetDate(void) const
Check if it is safe to call GetDate method.
const TVolume & GetVolume(void) const
Get the Volume member data.
const TTitle & GetTitle(void) const
Get the Title member data.
const TJournal & GetJournal(void) const
Get the Journal member data.
bool IsSetTitle(void) const
eg.
bool IsSetJournal(void) const
Check if a value has been assigned to Journal data member.
bool CanGetVolume(void) const
Check if it is safe to call GetVolume method.
bool CanGetAuthors(void) const
Check if it is safe to call GetAuthors method.
bool IsSetIssue(void) const
Check if a value has been assigned to Issue data member.
TMuid GetMuid(void) const
Get the Muid member data.
bool IsSetMuid(void) const
medline uid Check if a value has been assigned to Muid data member.
bool CanGetSerial_number(void) const
Check if it is safe to call GetSerial_number method.
bool CanGetCit(void) const
Check if it is safe to call GetCit method.
static const char * prefix[]
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)