NCBI C++ ToolKit
|
Search Toolkit Book for CTaxon1
#include <objects/taxon1/taxon1.hpp>
Public Types | |
enum | EOrgRefStatus { eStatus_Ok = COrg_ref::eOrgref_nothing , eStatus_WrongTaxId = COrg_ref::eOrgref_db_taxid , eStatus_NoOrgname = COrg_ref::eOrgref_orgname , eStatus_WrongTaxname = COrg_ref::eOrgref_taxname , eStatus_WrongOrgrefMod = COrg_ref::eOrgref_mod , eStatus_WrongCommonName = COrg_ref::eOrgref_common , eStatus_WrongOrgname = COrg_ref::eOrgref_on_name , eStatus_WrongOrgmod = COrg_ref::eOrgref_on_mod , eStatus_WrongLineage = COrg_ref::eOrgref_on_lin , eStatus_WrongDivision = COrg_ref::eOrgref_on_div , eStatus_WrongGC = COrg_ref::eOrgref_on_gc , eStatus_WrongMGC = COrg_ref::eOrgref_on_mgc , eStatus_WrongPGC = COrg_ref::eOrgref_on_pgc , eStatus_WrongOrgnameAttr = COrg_ref::eOrgref_on_attr , eStatus_WrongONASpecified = COrg_ref::eOrgref_on_attr_spec , eStatus_WrongONANoModFwd = COrg_ref::eOrgref_on_attr_nofwd , eStatus_WrongONAUncultured = COrg_ref::eOrgref_on_attr_uncult , eStatus_WrongNomenclature = COrg_ref::eOrgref_on_mod_nom , eStatus_WrongModOldname = COrg_ref::eOrgref_on_mod_oldname , eStatus_WrongModTypeMaterial = COrg_ref::eOrgref_on_mod_tm } |
enum | ESearch { eSearch_Exact , eSearch_TokenSet , eSearch_WildCard , eSearch_Phonetic } |
enum | ESpeciesMode { eSpeciesMode_RankOnly , eSpeciesMode_Flag } |
enum | EIteratorMode { eIteratorMode_FullTree , eIteratorMode_LeavesBranches , eIteratorMode_Best , eIteratorMode_Blast , eIteratorMode_Default = eIteratorMode_FullTree } |
typedef list< string > | TNameList |
typedef vector< TTaxId > | TTaxIdList |
typedef list< CRef< CTaxon1_info > > | TInfoList |
typedef unsigned | TOrgRefStatus |
Static Public Attributes | |
static const unsigned | def_reconnect_attempts = 5 |
static const unsigned | def_cache_capacity = 1000 |
Private Types | |
typedef map< TTaxGeneticCode, string > | TGCMap |
Private Member Functions | |
void | Reset (void) |
bool | SendRequest (CTaxon1_req &req, CTaxon1_resp &resp, bool bShouldReconnect=true) |
void | SetLastError (const char *err_msg) |
bool | LoadSubtreeEx (TTaxId tax_id, int type, const ITaxon1Node **ppNode) |
TOrgRefStatus | x_ConvertOrgrefProps (CTaxon2_data &data) |
Private Attributes | |
ESerialDataFormat | m_eDataFormat |
const char * | m_pchService |
STimeout * | m_timeout |
STimeout | m_timeout_value |
CConn_ServiceStream * | m_pServer |
CObjectOStream * | m_pOut |
CObjectIStream * | m_pIn |
unsigned | m_nReconnectAttempts |
COrgRefCache * | m_plCache |
bool | m_bWithSynonyms |
string | m_sLastError |
TGCMap | m_gcStorage |
Friends | |
class | COrgRefCache |
Definition at line 67 of file taxon1.hpp.
|
private |
Definition at line 610 of file taxon1.hpp.
typedef list< CRef< CTaxon1_info > > CTaxon1::TInfoList |
Definition at line 71 of file taxon1.hpp.
typedef list< string > CTaxon1::TNameList |
Definition at line 69 of file taxon1.hpp.
typedef unsigned CTaxon1::TOrgRefStatus |
Definition at line 113 of file taxon1.hpp.
typedef vector< TTaxId > CTaxon1::TTaxIdList |
Definition at line 70 of file taxon1.hpp.
Enumerator | |
---|---|
eIteratorMode_FullTree | |
eIteratorMode_LeavesBranches | |
eIteratorMode_Best | |
eIteratorMode_Blast | |
eIteratorMode_Default |
Definition at line 510 of file taxon1.hpp.
Definition at line 152 of file taxon1.hpp.
enum CTaxon1::ESearch |
Enumerator | |
---|---|
eSearch_Exact | |
eSearch_TokenSet | |
eSearch_WildCard | |
eSearch_Phonetic |
Definition at line 181 of file taxon1.hpp.
Enumerator | |
---|---|
eSpeciesMode_RankOnly | |
eSpeciesMode_Flag |
Definition at line 270 of file taxon1.hpp.
CTaxon1::CTaxon1 | ( | ) |
Definition at line 60 of file taxon1.cpp.
CTaxon1::~CTaxon1 | ( | ) |
Definition at line 71 of file taxon1.cpp.
References Fini().
bool CTaxon1::CheckOrgRef | ( | const COrg_ref & | orgRef, |
TOrgRefStatus & | stat_out, | ||
string * | psLog = 0 |
||
) |
Definition at line 2145 of file taxon1.cpp.
References eStatus_Ok, CTaxon1_resp_Base::GetLookup(), CTaxon1_data_Base::GetOrg(), CTaxon2_data::GetProperty(), Init(), CTaxon1_resp_Base::IsLookup(), NULL, SendRequest(), SetLastError(), CTaxon1_req_Base::SetLookup(), CTaxon2_data_Base::SetOrg(), COrgrefProp::SetOrgrefProp(), TAXON1_IS_INITED, and x_ConvertOrgrefProps().
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::DumpNames | ( | TTaxNameClass | name_class, |
list< CRef< CTaxon1_name > > & | out | ||
) |
Definition at line 1327 of file taxon1.cpp.
References Init(), CTaxon1_resp_Base::IsDumpnames4class(), NULL, SendRequest(), CTaxon1_req_Base::SetDumpnames4class(), CTaxon1_resp_Base::SetDumpnames4class(), SetLastError(), and TAXON1_IS_INITED.
Definition at line 548 of file taxon1.cpp.
References CTaxon1_resp_Base::GetGetunique(), GetTaxIdByName(), Init(), INVALID_TAX_ID, CTaxon1_resp_Base::IsGetunique(), NULL, SendRequest(), CTaxon1_req_Base::SetGetunique(), SetLastError(), TAX_ID_CONST, TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE().
void CTaxon1::Fini | ( | void | ) |
Definition at line 203 of file taxon1.cpp.
References CTaxon1_resp_Base::IsFini(), NULL, Reset(), SendRequest(), CTaxon1_req_Base::SetFini(), SetLastError(), and TAXON1_IS_INITED.
Referenced by fta_replace_org(), NCBITEST_AUTO_FINI(), CTaxFormat::~CTaxFormat(), ~CTaxon1(), and TaxClient::~TaxClient().
Definition at line 1248 of file taxon1.cpp.
References CTaxon1_resp_Base::GetGetorgnames(), i, Init(), CTaxon1_resp_Base::IsGetorgnames(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgnames(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::GetAllNamesEx | ( | TTaxId | tax_id, |
list< CRef< CTaxon1_name > > & | lNames | ||
) |
Definition at line 1293 of file taxon1.cpp.
References CTaxon1_resp_Base::GetGetorgnames(), i, Init(), CTaxon1_resp_Base::IsGetorgnames(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgnames(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by GetDisplayCommonName(), and GetTypeMaterial().
int CTaxon1::GetAllTaxIdByName | ( | const string & | orgname, |
TTaxIdList & | lIds | ||
) |
Definition at line 659 of file taxon1.cpp.
References CTaxon1_resp_Base::GetFindname(), i, Init(), CTaxon1_resp_Base::IsFindname(), NULL, SendRequest(), CTaxon1_req_Base::SetFindname(), SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 942 of file taxon1.cpp.
References ERR_POST_X, COrgRefCache::FindRankByName(), GetLastError(), Init(), m_plCache, NULL, SetLastError(), TAX_ID_CONST, and TAXON1_IS_INITED.
Referenced by CScore_Taxid::Get(), CLocalTaxon::GetGenus(), CLocalTaxon::GetOrder(), and CLocalTaxon::GetSpecies().
Definition at line 962 of file taxon1.cpp.
References CTaxon1Node::GetParent(), CTaxon1Node::GetRank(), CTaxon1Node::GetTaxId(), Init(), INVALID_TAX_ID, CTaxon1Node::IsRoot(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAX_ID_CONST, TAXON1_IS_INITED, and ZERO_TAX_ID.
Definition at line 1405 of file taxon1.cpp.
References CTaxon1Node::GetBlastName(), CTaxon1Node::GetParent(), Init(), CTaxon1Node::IsRoot(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE(), GetDisplayCommonName(), CTaxFormat::x_InitBlastNameTaxInfo(), and CPhyTreeFormatter::x_InitTreeFeatures().
CRef< CTaxon2_data > CTaxon1::GetById | ( | TTaxId | tax_id | ) |
Definition at line 230 of file taxon1.cpp.
References Init(), COrgRefCache::LookupAndInsert(), m_plCache, NULL, s_achInvalTaxid, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), fta_get_orgref_byid(), TaxClient::GetTaxNameForTaxID(), and CAgpconvertApplication::x_HandleTaxArgs().
int CTaxon1::GetChildren | ( | TTaxId | id_tax, |
TTaxIdList & | children_ids | ||
) |
Definition at line 992 of file taxon1.cpp.
References CTreeIterator::AddChild(), CTreeCont::GetIterator(), CTaxon1Node::GetTaxId(), COrgRefCache::GetTree(), CTreeIterator::GoNode(), i, Init(), CTaxon1_resp_Base::IsTaxachildren(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SendRequest(), COrgRefCache::SetIndexEntry(), SetLastError(), CTaxon1_req_Base::SetTaxachildren(), CTaxon1_resp_Base::SetTaxachildren(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 2296 of file taxon1.cpp.
References GetAllNamesEx(), GetBlastName(), COrgRefCache::GetCommonNameClass(), COrgRefCache::GetPreferredCommonNameClass(), GetSpecies(), CTaxon1Node::GetTaxId(), Init(), COrgRefCache::InitNameClasses(), ITERATE, COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by TaxClient::GetDisplayCommonName().
TTaxDivision CTaxon1::GetDivisionIdByName | ( | const string & | div_name | ) |
Definition at line 1154 of file taxon1.cpp.
References COrgRefCache::FindDivisionByCode(), COrgRefCache::FindDivisionByName(), Init(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::GetDivisionName | ( | TTaxDivision | div_id, |
string & | div_name_out, | ||
string * | div_code_out = NULL |
||
) |
Definition at line 1126 of file taxon1.cpp.
References COrgRefCache::GetDivisionCode(), COrgRefCache::GetDivisionName(), Init(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::GetGCName | ( | TTaxGeneticCode | gc_id, |
string & | gc_name_out | ||
) |
Definition at line 1036 of file taxon1.cpp.
References map_checker< Container >::empty(), map_checker< Container >::end(), map_checker< Container >::find(), CTaxon1_resp_Base::GetGetgcs(), i, Init(), map_checker< Container >::insert(), CTaxon1_resp_Base::IsGetgcs(), m_gcStorage, NULL, SendRequest(), CTaxon1_req_Base::SetGetgcs(), SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 843 of file taxon1.cpp.
References COrgRefCache::GetGenusRank(), CTaxon1Node::GetParent(), CTaxon1Node::GetRank(), CTaxon1Node::GetTaxId(), Init(), COrgRefCache::InitRanks(), INVALID_TAX_ID, CTaxon1Node::IsRoot(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::GetInheritedPropertyDefines | ( | const string & | prop_name, |
CTaxon1::TInfoList & | results, | ||
TTaxId | subtree_root = TAX_ID_CONST(1) |
||
) |
Definition at line 1927 of file taxon1.cpp.
References CTaxon1_error_Base::eLevel_none, ERR_POST_X, CTaxon1_resp_Base::GetError(), CTaxon1_error::GetErrorText(), CTaxon1_resp_Base::GetGetorgprop(), GetLastError(), CTaxon1_error_Base::GetLevel(), Init(), CTaxon1_resp_Base::IsError(), CTaxon1_resp_Base::IsGetorgprop(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgprop(), CTaxon1_resp_Base::SetGetorgprop(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by s_InitializeViralMap().
Definition at line 471 of file taxon1.hpp.
References m_sLastError.
Referenced by GetAncestorByRank(), GetInheritedPropertyDefines(), GetNodeProperty(), GetTaxId4GI(), GetTypeMaterial(), SearchTaxIdByName(), CTaxTreeToolJob::x_CreateProjectItems(), CTreeBuilderJob::x_CreateProjectItems(), CTaxFormat::x_InitTaxClient(), and CTaxFormat::x_LoadTaxTree().
TTaxId CTaxon1::GetMaxTaxId | ( | void | ) |
Definition at line 2273 of file taxon1.cpp.
References Init(), INVALID_TAX_ID, COrgRefCache::m_nMaxTaxId, m_plCache, NULL, SetLastError(), TAX_ID_FROM, and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
bool CTaxon1::GetNameClass | ( | TTaxNameClass | nameclass_id, |
string & | class_name_out | ||
) |
Definition at line 1176 of file taxon1.cpp.
References COrgRefCache::GetNameClassName(), Init(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
TTaxNameClass CTaxon1::GetNameClassId | ( | const string & | class_name | ) |
Definition at line 1199 of file taxon1.cpp.
References COrgRefCache::FindNameClassByName(), Init(), COrgRefCache::InitNameClasses(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by GetTypeMaterial(), and CTaxFormat::x_InitBlastNameTaxInfo().
Definition at line 1821 of file taxon1.cpp.
References CTaxon1_error_Base::eLevel_none, ERR_POST_X, CTaxon1_resp_Base::GetError(), CTaxon1_error::GetErrorText(), CTaxon1_resp_Base::GetGetorgprop(), GetLastError(), CTaxon1_error_Base::GetLevel(), Init(), CTaxon1_resp_Base::IsError(), CTaxon1_resp_Base::IsGetorgprop(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgprop(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by GetOrgRef().
Definition at line 1874 of file taxon1.cpp.
References CTaxon1_error_Base::eLevel_none, ERR_POST_X, CTaxon1_resp_Base::GetError(), CTaxon1_error::GetErrorText(), CTaxon1_resp_Base::GetGetorgprop(), GetLastError(), CTaxon1_error_Base::GetLevel(), Init(), CTaxon1_resp_Base::IsError(), CTaxon1_resp_Base::IsGetorgprop(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgprop(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
Definition at line 1768 of file taxon1.cpp.
References CTaxon1_error_Base::eLevel_none, ERR_POST_X, CTaxon1_resp_Base::GetError(), CTaxon1_error::GetErrorText(), CTaxon1_resp_Base::GetGetorgprop(), GetLastError(), CTaxon1_error_Base::GetLevel(), Init(), CTaxon1_resp_Base::IsError(), CTaxon1_resp_Base::IsGetorgprop(), NULL, SendRequest(), CTaxon1_req_Base::SetGetorgprop(), SetLastError(), TAX_ID_TO, and TAXON1_IS_INITED.
CConstRef< COrg_ref > CTaxon1::GetOrgRef | ( | TTaxId | tax_id, |
bool & | is_species, | ||
bool & | is_uncultured, | ||
string & | blast_name, | ||
bool * | is_specified = NULL |
||
) |
Definition at line 704 of file taxon1.cpp.
References CTaxon2_data_Base::GetBlast_name(), CTaxon2_data_Base::GetIs_species_level(), CTaxon2_data_Base::GetIs_uncultured(), GetNodeProperty(), CTaxon2_data_Base::GetOrg(), Init(), CTaxon2_data_Base::IsSetBlast_name(), COrgRefCache::LookupAndInsert(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), GetCommonTax(), TaxClient::GetOrgRef(), GetTypeMaterial(), CTaxonCache::Initialize(), IsLikelyTaxname(), CTreeBuilderJob::x_CreateProjectItems(), CAltValidator::x_GetTaxonSpecies(), and CTaxonCache::x_QueryTaxonService().
Definition at line 761 of file taxon1.cpp.
References CTaxon1Node::GetParent(), CTaxon1Node::GetTaxId(), Init(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), TaxClient::GetParentTaxID(), and CAltValidator::x_GetTaxonSpecies().
bool CTaxon1::GetPopsetJoin | ( | const TTaxIdList & | ids_in, |
TTaxIdList & | ids_out | ||
) |
Definition at line 1546 of file taxon1.cpp.
References CTreeIterator::AddChild(), map_checker< Container >::end(), map_checker< Container >::find(), CTreeCont::GetIterator(), CTreeIterator::GetNode(), CTaxon1Node::GetParent(), CTreeCont::GetRoot(), CTaxon1Node::GetTaxId(), COrgRefCache::GetTree(), CTreeIterator::GoChild(), CTreeIterator::GoNode(), CTreeIterator::GoParent(), CTreeIterator::GoRoot(), CTreeIterator::GoSibling(), i, Init(), map_checker< Container >::insert(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, s_StoreResidueTaxid(), SetLastError(), CTreeCont::SetRoot(), and TAXON1_IS_INITED.
Referenced by TaxClient::GetFullLineage(), CTaxTreeToolJob::x_CreateProjectItems(), and CTaxFormat::x_LoadTaxTree().
Definition at line 1105 of file taxon1.cpp.
References COrgRefCache::FindRankByName(), Init(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 1081 of file taxon1.cpp.
References COrgRefCache::GetRankName(), Init(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by TaxClient::GetRankID().
Definition at line 2390 of file taxon1.cpp.
References CTaxon1Node::GetName(), Init(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by BOOST_AUTO_TEST_CASE(), and s_InitializeViralMap().
TTaxId CTaxon1::GetSpecies | ( | TTaxId | id_tax, |
ESpeciesMode | mode = eSpeciesMode_Flag |
||
) |
Definition at line 789 of file taxon1.cpp.
References eSpeciesMode_RankOnly, CTaxon2_data_Base::GetIs_species_level(), CTaxon1Node::GetParent(), CTaxon1Node::GetRank(), COrgRefCache::GetSpeciesRank(), CTaxon1Node::GetTaxId(), Init(), COrgRefCache::InitRanks(), INVALID_TAX_ID, CTaxon1Node::IsRoot(), CTaxon2_data_Base::IsSetIs_species_level(), COrgRefCache::LookupAndAdd(), COrgRefCache::LookupAndInsert(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by GetDisplayCommonName().
Definition at line 875 of file taxon1.cpp.
References CTaxon1Node::GetParent(), CTaxon1Node::GetRank(), COrgRefCache::GetSuperkingdomRank(), CTaxon1Node::GetTaxId(), Init(), COrgRefCache::InitRanks(), INVALID_TAX_ID, CTaxon1Node::IsRoot(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by TaxClient::GetSuperKingdom().
Definition at line 1371 of file taxon1.cpp.
References CTaxon1_error_Base::eLevel_error, NStr::EqualNocase(), CTaxon1_resp_Base::GetError(), CTaxon1_resp_Base::GetId4gi(), GetLastError(), CTaxon1_error_Base::GetLevel(), CTaxon1_error_Base::GetMsg(), Init(), CTaxon1_resp_Base::IsError(), CTaxon1_resp_Base::IsId4gi(), CTaxon1_error_Base::IsSetLevel(), CTaxon1_error_Base::IsSetMsg(), NULL, SendRequest(), CTaxon1_req_Base::SetId4gi(), SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), GetCommonTax(), TaxClient::GetTaxIDForGI(), CGi2TaxIdApp::Run(), CTaxTreeToolJob::x_CreateProjectItems(), CTreeBuilderJob::x_CreateProjectItems(), and CSFTranslationJob::x_InitGeneticCode().
Definition at line 523 of file taxon1.cpp.
References eSearch_Exact, INVALID_TAX_ID, NULL, SearchTaxIdByName(), SetLastError(), TAX_ID_TO, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), FindTaxIdByName(), and IsLikelyTaxname().
Definition at line 489 of file taxon1.cpp.
References CTaxon1_resp_Base::GetGetidbyorg(), Init(), INVALID_TAX_ID, CTaxon1_resp_Base::IsGetidbyorg(), NULL, SendRequest(), CTaxon1_req_Base::SetGetidbyorg(), SetLastError(), TAX_ID_FROM, TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), fta_replace_org(), and TaxClient::GetTaxIDFromBioseq().
CRef< ITreeIterator > CTaxon1::GetTreeIterator | ( | CTaxon1::EIteratorMode | mode = eIteratorMode_Default | ) |
Definition at line 1715 of file taxon1.cpp.
References eIteratorMode_Best, eIteratorMode_Blast, eIteratorMode_FullTree, eIteratorMode_LeavesBranches, CTreeCont::GetConstIterator(), COrgRefCache::GetTree(), Init(), m_plCache, NULL, CRef< C, Locker >::Reset(), SetLastError(), and TAXON1_IS_INITED.
Referenced by TaxClient::GetRankID(), GetTreeIterator(), Join(), CTaxTreeToolJob::x_CreateProjectItems(), and CTaxFormat::x_LoadTaxTree().
CRef< ITreeIterator > CTaxon1::GetTreeIterator | ( | TTaxId | tax_id, |
CTaxon1::EIteratorMode | mode = eIteratorMode_Default |
||
) |
Definition at line 1746 of file taxon1.cpp.
References GetTreeIterator(), ITreeIterator::GoNode(), Init(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, CRef< C, Locker >::Reset(), SetLastError(), and TAXON1_IS_INITED.
Definition at line 2196 of file taxon1.cpp.
References a, b, NStr::EqualNocase(), ERR_POST_X, GetAllNamesEx(), COrgName_Base::C_Name::GetBinomial(), GetLastError(), GetNameClassId(), GetOrgRef(), CTaxon1Node::GetParent(), CTaxon1Node::GetRank(), CBinomialOrgName_Base::GetSpecies(), COrgRefCache::GetSpeciesRank(), CBinomialOrgName_Base::GetSubspecies(), COrgRefCache::GetSubspeciesRank(), CTaxon1Node::GetTaxId(), i, Init(), COrgRefCache::InitRanks(), COrgName_Base::C_Name::IsBinomial(), CTaxon1Node::IsRoot(), CBinomialOrgName_Base::IsSetSpecies(), CBinomialOrgName_Base::IsSetSubspecies(), ITERATE, COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), and TAXON1_IS_INITED.
bool CTaxon1::Init | ( | const STimeout * | timeout, |
unsigned | reconnect_attempts = def_reconnect_attempts , |
||
unsigned | cache_capacity = def_cache_capacity |
||
) |
Definition at line 113 of file taxon1.cpp.
References ConnNetInfo_Create(), ConnNetInfo_Destroy(), ConnNetInfo_SetTimeout(), COrgRefCache, eFNP_Allow, eSerial_AsnBinary, eSerial_AsnText, fSERV_Any, COrgRefCache::Init(), CTaxon1_resp_Base::IsInit(), m_eDataFormat, m_nReconnectAttempts, m_pchService, m_pIn, m_plCache, m_pOut, m_pServer, m_timeout, m_timeout_value, SConnNetInfo::max_try, NULL, CObjectIStream::Open(), CObjectOStream::Open(), SendRequest(), CTaxon1_req_Base::SetInit(), SetLastError(), TAXON1_IS_INITED, and tmp.
bool CTaxon1::Init | ( | unsigned | cache_capacity | ) |
Definition at line 107 of file taxon1.cpp.
References def_reconnect_attempts, def_timeout, and Init().
bool CTaxon1::Init | ( | void | ) |
Definition at line 101 of file taxon1.cpp.
References def_cache_capacity, def_reconnect_attempts, and def_timeout.
Referenced by BOOST_AUTO_TEST_CASE(), CheckOrgRef(), TaxClient::ConnectToTaxServer(), DumpNames(), FindTaxIdByName(), fta_get_orgref_byid(), fta_init_tax_server(), fta_replace_org(), CScore_Taxid::Get(), GetAllNames(), GetAllNamesEx(), GetAllTaxIdByName(), GetAncestorByRank(), GetBlastName(), GetById(), GetChildren(), GetCommonTax(), GetDisplayCommonName(), GetDivisionIdByName(), GetDivisionName(), GetGCName(), GetGenus(), GetInheritedPropertyDefines(), GetMaxTaxId(), GetNameClass(), GetNameClassId(), GetNodeProperty(), GetOrgRef(), GetParent(), GetPopsetJoin(), GetRankIdByName(), GetRankName(), GetScientificName(), GetSpecies(), GetSuperkingdom(), GetTaxId4GI(), GetTaxIdByOrgRef(), GetTreeIterator(), GetTypeMaterial(), Init(), CTaxonCache::Initialize(), IsLikelyTaxname(), Join(), LoadSubtreeEx(), Lookup(), LookupMerge(), CGi2TaxIdApp::Run(), SearchTaxIdByName(), CTaxTreeToolJob::x_CreateProjectItems(), CTreeBuilderJob::x_CreateProjectItems(), COrfSearchJob::x_DoSearch(), CAltValidator::x_GetTaxonSpecies(), CAgpconvertApplication::x_HandleTaxArgs(), CSFTranslationJob::x_InitGeneticCode(), CTaxFormat::x_InitTaxClient(), and CPhyTreeFormatter::x_InitTreeFeatures().
bool CTaxon1::IsAlive | ( | void | ) |
Definition at line 1354 of file taxon1.cpp.
References CObjectIStream::InGoodState(), CObjectOStream::InGoodState(), m_pIn, m_pOut, NULL, SetLastError(), and TAXON1_IS_INITED.
Referenced by TaxClient::ConnectToTaxServer(), TaxClient::IsAlive(), CTaxTreeToolJob::x_CreateProjectItems(), CTreeBuilderJob::x_CreateProjectItems(), CTaxFormat::x_InitBlastNameTaxInfo(), CTaxFormat::x_InitTaxClient(), and CTaxFormat::x_LoadTaxTree().
Definition at line 1220 of file taxon1.cpp.
References ITreeIterator::GetNode(), ITaxon1Node::GetTaxId(), GetTreeIterator(), ITreeIterator::GoAncestor(), ITreeIterator::GoNode(), Init(), INVALID_TAX_ID, COrgRefCache::LookupAndAdd(), m_plCache, NULL, SetLastError(), TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE(), GetCommonTax(), TaxClient::IsTaxDescendant(), and TaxClient::Join().
|
inline |
Definition at line 498 of file taxon1.hpp.
References LoadSubtreeEx().
|
inline |
Definition at line 488 of file taxon1.hpp.
References LoadSubtreeEx().
Referenced by CTaxTreeToolJob::x_CreateProjectItems(), COrfSearchJob::x_DoSearch(), CSFTranslationJob::x_InitGeneticCode(), and CTaxFormat::x_LoadTaxTree().
|
inline |
Definition at line 507 of file taxon1.hpp.
References LoadSubtreeEx().
|
private |
Definition at line 1639 of file taxon1.cpp.
References CTreeIterator::AddChild(), CTreeCont::GetIterator(), CTaxon1Node::GetTaxId(), COrgRefCache::GetTree(), CTreeIterator::GoNode(), i, Init(), CTaxon1Node::IsSubtreeLoaded(), CTaxon1_resp_Base::IsTaxachildren(), COrgRefCache::Lookup(), COrgRefCache::LookupAndAdd(), m_plCache, NULL, NStr::NumericToString(), SendRequest(), COrgRefCache::SetIndexEntry(), SetLastError(), CTaxon1Node::SetSubtreeLoaded(), CTaxon1_req_Base::SetTaxachildren(), CTaxon1_resp_Base::SetTaxachildren(), TAX_ID_TO, and TAXON1_IS_INITED.
Referenced by LoadChildren(), LoadNode(), and LoadSubtree().
CRef< CTaxon2_data > CTaxon1::Lookup | ( | const COrg_ref & | inp_orgRef, |
string * | psLog = 0 |
||
) |
Definition at line 384 of file taxon1.cpp.
References CTaxon1_resp_Base::GetLookup(), CTaxon1_data_Base::GetOrg(), CTaxon2_data::GetProperty(), Init(), CTaxon1_resp_Base::IsLookup(), m_bWithSynonyms, NULL, CRef< C, Locker >::Reset(), SendRequest(), SetLastError(), CTaxon1_req_Base::SetLookup(), CTaxon2_data_Base::SetOrg(), COrgrefProp::SetOrgrefProp(), TAXON1_IS_INITED, and x_ConvertOrgrefProps().
Referenced by BOOST_AUTO_TEST_CASE(), and fta_replace_org().
CConstRef< CTaxon2_data > CTaxon1::LookupMerge | ( | COrg_ref & | inp_orgRef, |
string * | psLog = 0 , |
||
TOrgRefStatus * | pStatusOut = 0 |
||
) |
Definition at line 429 of file taxon1.cpp.
References CTaxon1_resp_Base::GetLookup(), CTaxon1_data_Base::GetOrg(), CTaxon2_data_Base::GetOrg(), CTaxon2_data::GetProperty(), Init(), CTaxon1_resp_Base::IsLookup(), m_bWithSynonyms, NULL, CRef< C, Locker >::Reset(), SendRequest(), SetLastError(), CTaxon1_req_Base::SetLookup(), CTaxon2_data_Base::SetOrg(), COrgrefProp::SetOrgrefProp(), TAXON1_IS_INITED, and x_ConvertOrgrefProps().
Referenced by BOOST_AUTO_TEST_CASE(), fta_replace_org(), and CAgpconvertApplication::x_HandleTaxArgs().
|
private |
Definition at line 78 of file taxon1.cpp.
References m_pIn, m_plCache, m_pOut, m_pServer, NULL, and SetLastError().
Referenced by Fini().
TTaxId CTaxon1::SearchTaxIdByName | ( | const string & | orgname, |
ESearch | mode = eSearch_TokenSet , |
||
list< CRef< CTaxon1_name > > * | name_list_out = NULL |
||
) |
Definition at line 595 of file taxon1.cpp.
References eSearch_Exact, eSearch_Phonetic, eSearch_TokenSet, eSearch_WildCard, GetLastError(), CTaxon1_resp_Base::GetSearchname(), Init(), INVALID_TAX_ID, CTaxon1_resp_Base::IsSearchname(), NULL, SendRequest(), SetLastError(), CTaxon1_req_Base::SetSearchname(), CTaxon1_resp_Base::SetSearchname(), TAX_ID_CONST, TAXON1_IS_INITED, and ZERO_TAX_ID.
Referenced by GetTaxIdByName(), and CTaxFormat::x_InitBlastNameTaxInfo().
|
private |
Definition at line 1429 of file taxon1.cpp.
References CObjectIStream::eFail, CObjectOStream::eFail, eFNP_Allow, CObjectIStream::eNotOpen, CObjectOStream::eNotOpen, CObjectIStream::eReadError, CObjectOStream::eWriteError, CObjectOStream::Flush(), fSERV_Any, CTaxon1_resp_Base::GetError(), CTaxon1_error::GetErrorText(), CObjectIStream::GetFailFlags(), CObjectOStream::GetFailFlags(), CObjectIStream::InGoodState(), m_eDataFormat, m_nReconnectAttempts, m_pchService, m_pIn, m_pOut, m_pServer, m_timeout, NULL, CObjectIStream::Open(), CObjectOStream::Open(), and SetLastError().
Referenced by CheckOrgRef(), DumpNames(), FindTaxIdByName(), Fini(), GetAllNames(), GetAllNamesEx(), GetAllTaxIdByName(), GetChildren(), GetGCName(), GetInheritedPropertyDefines(), GetNodeProperty(), GetTaxId4GI(), GetTaxIdByOrgRef(), Init(), COrgRefCache::Init(), COrgRefCache::InitDomain(), COrgRefCache::InitNameClasses(), COrgRefCache::Insert2(), LoadSubtreeEx(), Lookup(), COrgRefCache::LookupAndAdd(), LookupMerge(), and SearchTaxIdByName().
|
private |
Definition at line 1516 of file taxon1.cpp.
References m_sLastError.
Referenced by CheckOrgRef(), DumpNames(), FindTaxIdByName(), Fini(), GetAllNames(), GetAllNamesEx(), GetAllTaxIdByName(), GetAncestorByRank(), GetBlastName(), GetById(), GetChildren(), GetDisplayCommonName(), GetDivisionIdByName(), GetDivisionName(), GetGCName(), GetGenus(), GetInheritedPropertyDefines(), GetMaxTaxId(), GetNameClass(), GetNameClassId(), GetNodeProperty(), GetOrgRef(), GetParent(), GetPopsetJoin(), GetRankIdByName(), GetRankName(), GetScientificName(), GetSpecies(), GetSuperkingdom(), GetTaxId4GI(), GetTaxIdByName(), GetTaxIdByOrgRef(), GetTreeIterator(), GetTypeMaterial(), Init(), COrgRefCache::Init(), COrgRefCache::InitDomain(), COrgRefCache::InitNameClasses(), COrgRefCache::InitRanks(), COrgRefCache::Insert2(), IsAlive(), Join(), LoadSubtreeEx(), Lookup(), COrgRefCache::LookupAndAdd(), LookupMerge(), Reset(), SearchTaxIdByName(), SendRequest(), and SetSynonyms().
Definition at line 746 of file taxon1.cpp.
References m_bWithSynonyms, NULL, and SetLastError().
Referenced by fix_synonyms(), and TaxClient::SetSynonyms().
|
private |
Definition at line 271 of file taxon1.cpp.
References data, CObject_id_Base::e_Id, CObject_id_Base::e_Str, NStr::EndsWith(), NStr::Equal(), NStr::EqualNocase(), eStatus_WrongCommonName, eStatus_WrongDivision, eStatus_WrongGC, eStatus_WrongLineage, eStatus_WrongMGC, eStatus_WrongOrgmod, eStatus_WrongOrgname, eStatus_WrongOrgnameAttr, eStatus_WrongOrgrefMod, eStatus_WrongPGC, eStatus_WrongTaxId, eStatus_WrongTaxname, NStr::fSplit_Tokenize, i, NON_CONST_ITERATE, result, s_GetBoolValue(), COrg_ref_Base::SetDb(), NStr::Split(), NStr::StartsWith(), and NStr::TruncateSpacesInPlace().
Referenced by CheckOrgRef(), COrgRefCache::Insert2(), Lookup(), and LookupMerge().
|
friend |
Definition at line 591 of file taxon1.hpp.
Referenced by Init().
|
static |
Definition at line 84 of file taxon1.hpp.
Referenced by Init().
|
static |
Definition at line 83 of file taxon1.hpp.
Referenced by Init().
|
private |
Definition at line 607 of file taxon1.hpp.
Referenced by COrgRefCache::Insert2(), Lookup(), LookupMerge(), and SetSynonyms().
|
private |
Definition at line 593 of file taxon1.hpp.
Referenced by Init(), and SendRequest().
|
private |
Definition at line 611 of file taxon1.hpp.
Referenced by GetGCName().
|
private |
Definition at line 603 of file taxon1.hpp.
Referenced by Init(), and SendRequest().
|
private |
Definition at line 594 of file taxon1.hpp.
Referenced by Init(), and SendRequest().
|
private |
Definition at line 601 of file taxon1.hpp.
Referenced by Init(), IsAlive(), Reset(), and SendRequest().
|
private |
Definition at line 605 of file taxon1.hpp.
Referenced by GetAncestorByRank(), GetBlastName(), GetById(), GetChildren(), GetDisplayCommonName(), GetDivisionIdByName(), GetDivisionName(), GetGenus(), GetMaxTaxId(), GetNameClass(), GetNameClassId(), GetOrgRef(), GetParent(), GetPopsetJoin(), GetRankIdByName(), GetRankName(), GetScientificName(), GetSpecies(), GetSuperkingdom(), GetTreeIterator(), GetTypeMaterial(), Init(), Join(), LoadSubtreeEx(), and Reset().
|
private |
Definition at line 600 of file taxon1.hpp.
Referenced by Init(), IsAlive(), Reset(), and SendRequest().
|
private |
Definition at line 598 of file taxon1.hpp.
Referenced by Init(), Reset(), and SendRequest().
|
private |
Definition at line 608 of file taxon1.hpp.
Referenced by GetLastError(), and SetLastError().
|
private |
Definition at line 595 of file taxon1.hpp.
Referenced by Init(), and SendRequest().
|
private |
Definition at line 596 of file taxon1.hpp.
Referenced by Init().