NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CAuthListValidator Class Reference

Search Toolkit Book for CAuthListValidator

#include <objtools/edit/pub_fix.hpp>

+ Collaboration diagram for CAuthListValidator:

Public Types

enum  EOutcome { eNotSet = 0 , eFailed_validation , eAccept_pubmed , eKeep_genbank }
 

Public Member Functions

 CAuthListValidator (IMessageListener *err_log)
 
EOutcome validate (const CCit_art &gb_art, const CCit_art &pm_art)
 
void DebugDump (CNcbiOstream &out) const
 

Static Public Member Functions

static void Configure (const CNcbiRegistry &cfg, const string &section)
 
static void get_lastnames (const CAuth_list &authors, list< string > &lastnames, string &auth_string)
 

Public Attributes

EOutcome outcome
 
int pub_year
 
int cnt_gb
 
int cnt_pm
 
int cnt_matched
 
int cnt_added
 
int cnt_removed
 
int cnt_min
 
list< stringmatched
 
list< stringremoved
 
list< stringadded
 
string gb_type
 
string pm_type
 
string gb_auth_string
 
string pm_auth_string
 
string reported_limit
 
double actual_matched_to_min
 
double actual_removed_to_gb
 

Static Public Attributes

static bool enabled = true
 

Private Member Functions

void compare_lastnames ()
 
void dumplist (const char *hdr, const list< string > &lst, CNcbiOstream &out) const
 

Static Private Member Functions

static void get_lastnames (const CAuth_list::C_Names::TStd &authors, list< string > &lastnames)
 
static void get_lastnames (const CAuth_list::C_Names::TStr &authors, list< string > &lastnames)
 

Private Attributes

IMessageListenerm_err_log
 

Static Private Attributes

static bool configured = false
 
static double cfg_matched_to_min = 0.3333
 
static double cfg_removed_to_gb = 0.3333
 

Detailed Description

Definition at line 83 of file pub_fix.hpp.

Member Enumeration Documentation

◆ EOutcome

Enumerator
eNotSet 
eFailed_validation 
eAccept_pubmed 
eKeep_genbank 

Definition at line 86 of file pub_fix.hpp.

Constructor & Destructor Documentation

◆ CAuthListValidator()

CAuthListValidator::CAuthListValidator ( IMessageListener err_log)

Definition at line 1402 of file pub_fix.cpp.

References Configure(), configured, eNotSet, and CNcbiApplication::Instance().

Member Function Documentation

◆ compare_lastnames()

void CAuthListValidator::compare_lastnames ( )
private

Definition at line 1500 of file pub_fix.cpp.

References added, cnt_added, cnt_gb, cnt_matched, cnt_min, cnt_pm, cnt_removed, matched, min(), and removed.

Referenced by validate().

◆ Configure()

void CAuthListValidator::Configure ( const CNcbiRegistry cfg,
const string section 
)
static

Definition at line 1394 of file pub_fix.cpp.

References IRegistry::GetBool(), and IRegistry::GetDouble().

Referenced by CAuthListValidator().

◆ DebugDump()

void CAuthListValidator::DebugDump ( CNcbiOstream out) const

◆ dumplist()

void CAuthListValidator::dumplist ( const char *  hdr,
const list< string > &  lst,
CNcbiOstream out 
) const
private

Definition at line 1493 of file pub_fix.cpp.

References a, and out().

Referenced by DebugDump().

◆ get_lastnames() [1/3]

void CAuthListValidator::get_lastnames ( const CAuth_list authors,
list< string > &  lastnames,
string auth_string 
)
static

◆ get_lastnames() [2/3]

void CAuthListValidator::get_lastnames ( const CAuth_list::C_Names::TStd authors,
list< string > &  lastnames 
)
staticprivate

Definition at line 1547 of file pub_fix.cpp.

References NStr::ToLower().

◆ get_lastnames() [3/3]

void CAuthListValidator::get_lastnames ( const CAuth_list::C_Names::TStr authors,
list< string > &  lastnames 
)
staticprivate

Definition at line 1557 of file pub_fix.cpp.

References NStr::ToLower().

◆ validate()

CAuthListValidator::EOutcome CAuthListValidator::validate ( const CCit_art gb_art,
const CCit_art pm_art 
)

Member Data Documentation

◆ actual_matched_to_min

double CAuthListValidator::actual_matched_to_min

Definition at line 119 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ actual_removed_to_gb

double CAuthListValidator::actual_removed_to_gb

Definition at line 120 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ added

list<string> CAuthListValidator::added

Definition at line 112 of file pub_fix.hpp.

Referenced by compare_lastnames(), DebugDump(), and validate().

◆ cfg_matched_to_min

double CAuthListValidator::cfg_matched_to_min = 0.3333
staticprivate

Definition at line 130 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ cfg_removed_to_gb

double CAuthListValidator::cfg_removed_to_gb = 0.3333
staticprivate

Definition at line 131 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ cnt_added

int CAuthListValidator::cnt_added

Definition at line 107 of file pub_fix.hpp.

Referenced by compare_lastnames().

◆ cnt_gb

int CAuthListValidator::cnt_gb

Definition at line 104 of file pub_fix.hpp.

Referenced by compare_lastnames(), DebugDump(), and validate().

◆ cnt_matched

int CAuthListValidator::cnt_matched

Definition at line 106 of file pub_fix.hpp.

Referenced by compare_lastnames(), and validate().

◆ cnt_min

int CAuthListValidator::cnt_min

Definition at line 109 of file pub_fix.hpp.

Referenced by compare_lastnames(), and validate().

◆ cnt_pm

int CAuthListValidator::cnt_pm

Definition at line 105 of file pub_fix.hpp.

Referenced by compare_lastnames(), DebugDump(), and validate().

◆ cnt_removed

int CAuthListValidator::cnt_removed

Definition at line 108 of file pub_fix.hpp.

Referenced by compare_lastnames(), and validate().

◆ configured

bool CAuthListValidator::configured = false
staticprivate

Definition at line 129 of file pub_fix.hpp.

Referenced by CAuthListValidator().

◆ enabled

bool CAuthListValidator::enabled = true
static

Definition at line 94 of file pub_fix.hpp.

Referenced by CPubFix::FixPubEquiv().

◆ gb_auth_string

string CAuthListValidator::gb_auth_string

Definition at line 115 of file pub_fix.hpp.

Referenced by validate().

◆ gb_type

string CAuthListValidator::gb_type

Definition at line 113 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ m_err_log

IMessageListener* CAuthListValidator::m_err_log
private

Definition at line 128 of file pub_fix.hpp.

Referenced by validate().

◆ matched

list<string> CAuthListValidator::matched

Definition at line 110 of file pub_fix.hpp.

Referenced by compare_lastnames(), DebugDump(), and validate().

◆ outcome

EOutcome CAuthListValidator::outcome

Definition at line 102 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ pm_auth_string

string CAuthListValidator::pm_auth_string

Definition at line 116 of file pub_fix.hpp.

Referenced by validate().

◆ pm_type

string CAuthListValidator::pm_type

Definition at line 114 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ pub_year

int CAuthListValidator::pub_year

Definition at line 103 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().

◆ removed

list<string> CAuthListValidator::removed

Definition at line 111 of file pub_fix.hpp.

Referenced by compare_lastnames(), DebugDump(), and validate().

◆ reported_limit

string CAuthListValidator::reported_limit

Definition at line 118 of file pub_fix.hpp.

Referenced by DebugDump(), and validate().


The documentation for this class was generated from the following files:
Modified on Sun Jun 16 04:32:33 2024 by modify_doxy.py rev. 669887