64 SetTaxon3(make_shared<CTaxon3>());
68 shared_ptr<SValidatorContext> pContext):
90 if (!
query.empty() && remote) {
110 if ( !imp.
Validate(se,
nullptr, scope) ) {
450 size_t stp = string::npos;
461 const char *ptr =
str.c_str();
468 || (*ptr ==
',' && allowcomma)
469 || (*ptr ==
'.' && (allowperiod || pos == stp))) {
474 string tail =
str.substr(pos);
560 if (int_prv && !compar(*int_cur, *int_prv, scope)) {
577 for (; lit &&
ok; ++lit) {
579 switch (loc_choice) {
581 int_cur = &lit->GetInt();
583 ok = compar(*int_cur, *int_prv, &scope);
597 (lit->GetPacked_int(), this_int_cur, this_int_prv, &scope, compar);
642 }
catch (
const exception& ) {
693 return (strand1 == strand2);
721 if (use_geo_loc_name) {
761 const string& db = xref.
GetDb();
775 bool refseq_db =
false;
778 if (xref.
GetDBFlags(refseq_db, src_db, correct_caps)) {
784 if (is_biosource && !src_db) {
786 if (refseq_db && is_refseq_or_gps) {
792 if (refseq_db && !is_refseq_or_gps) {
User-defined methods of the data storage class.
@ eErr_SEQ_DESCR_LatLonWater
@ eErr_SEQ_DESCR_LatLonCountry
@ eErr_SEQ_DESCR_LatLonValue
@ eErr_SEQ_DESCR_LatLonGeoLocName
@ eErr_SEQ_DESCR_LatLonState
CValidator::CCacheImpl CCacheImpl
bool GetDBFlags(bool &is_refseq, bool &is_src, string &correct_caps) const
@Name_std.hpp User-defined methods of the data storage class.
Base class for all object manager exceptions.
@Pubdesc.hpp User-defined methods of the data storage class.
namespace ncbi::objects::
static bool NCBI_UseGeoLocNameForCountry(void)
@ eLatLonCountryErr_Value
@ eLatLonCountryErr_State
@ eLatLonCountryErr_Water
@ eLatLonCountryErr_Country
Template class for iteration on objects of class C (non-medifiable version)
bool IsValidStructuredComment(const CSeqdesc &desc)
size_t GetGeneCount(void) const
TSuppressed & SetSuppressed()
bool GetTSAConflictingBiomolTechErrors(const CSeq_entry_Handle &se)
bool Validate(const CSeq_entry &se, const CCit_sub *cs=nullptr, CScope *scope=nullptr)
const CValidatorEntryInfo & GetEntryInfo() const
size_t GetCumulativeInferenceCount(void) const
SValidatorContext & SetContext()
void SetProgressCallback(CValidator::TProgressCallback callback, void *user_data)
bool GetTSACDSOnMinusStrandErrors(const CSeq_entry_Handle &se)
bool GetTSANStretchErrors(const CSeq_entry_Handle &se)
size_t GetGeneXrefCount(void) const
CRef< CValidError > Validate(const CSeq_entry &se, CScope *scope=nullptr, Uint4 options=0)
CRef< CObjectManager > m_ObjMgr
CConstRef< CValidError > GetTSANStretchErrors(const CSeq_entry_Handle &se)
void x_SetEntryInfo(const TEntryInfo &info)
CConstRef< CValidError > GetTSACDSOnMinusStrandErrors(const CSeq_entry_Handle &se)
unique_ptr< CValidatorEntryInfo > m_pEntryInfo
static CRef< CCache > MakeEmptyCache()
TProgressCallback m_PrgCallback
static TDbxrefValidFlags IsValidDbxref(const CDbtag &xref, bool is_biosource, bool is_refseq_or_gps)
static bool BadCharsInAuthorFirstName(const string &str)
shared_ptr< SValidatorContext > m_pContext
static bool DoesSeqLocContainDuplicateIntervals(const CSeq_loc &loc, CScope &scope)
void SetProgressCallback(TProgressCallback callback, void *user_data=nullptr)
CConstRef< CValidError > GetTSAConflictingBiomolTechErrors(const CSeq_entry_Handle &se)
const TEntryInfo & GetEntryInfo() const
static bool BadCharsInAuthorInitials(const string &str)
static EErrType ConvertCode(CSubSource::ELatLonCountryErr errcode)
static bool DoesSeqLocContainAdjacentIntervals(const CSeq_loc &loc, CScope &scope)
static bool BadCharsInAuthorName(const string &str, bool allowcomma, bool allowperiod, bool last)
bool IsValidStructuredComment(const CSeqdesc &desc) const
shared_ptr< ITaxon3 > m_pOwnTaxon
CValidatorEntryInfo TEntryInfo
static string BadCharsInAuthor(const CName_std &author, bool &last_is_bad)
static bool IsSeqLocCorrectlyOrdered(const CSeq_loc &loc, CScope &scope)
static bool BadCharsInAuthorLastName(const string &str)
void SetTaxon3(shared_ptr< ITaxon3 > taxon)
bool IsSetEntryInfo() const
static taxupdate_func_t MakeTaxUpdateFunction(shared_ptr< ITaxon3 > taxon)
static bool BadCharsInAuthorSuffix(const string &str)
CValidator(CObjectManager &objmgr)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CCache(TSizeType capacity, THandler *handler=NULL)
Create cache object with the given capacity.
CConstBeginInfo ConstBegin(const C &obj)
Get starting point of non-modifiable object hierarchy.
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CConstRef< CSeq_annot > GetCompleteSeq_annot(void) const
Complete and return const reference to the current seq-annot.
TInst_Topology GetInst_Topology(void) const
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#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.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-sensitive equality of a substring with another string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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 bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
const TName & GetName(void) const
Get the Name member data.
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetDb(void) const
name of database or system Check if a value has been assigned to Db data member.
const TTag & GetTag(void) const
Get the Tag member data.
bool IsSetSuffix(void) const
Jr, Sr, III Check if a value has been assigned to Suffix data member.
bool IsId(void) const
Check if variant Id is selected.
bool IsSetTag(void) const
appropriate tag Check if a value has been assigned to Tag data member.
const TInitials & GetInitials(void) const
Get the Initials member data.
bool IsName(void) const
Check if variant Name is selected.
const TDb & GetDb(void) const
Get the Db member data.
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 TStr & GetStr(void) const
Get the variant data.
const TSuffix & GetSuffix(void) const
Get the Suffix member data.
const TFirst & GetFirst(void) const
Get the First member data.
const TLast & GetLast(void) const
Get the Last member data.
const TName & GetName(void) const
Get the variant data.
bool IsSetFirst(void) const
Check if a value has been assigned to First data member.
TId GetId(void) const
Get the variant data.
list< CRef< CSeq_interval > > Tdata
ENa_strand
strand of nucleic acid
const Tdata & Get(void) const
Get the member data.
const TId & GetId(void) const
Get the Id member data.
TFrom GetFrom(void) const
Get the From member data.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
TStrand GetStrand(void) const
Get the Strand member data.
TTo GetTo(void) const
Get the To member data.
bool IsUser(void) const
Check if variant User is selected.
function< CRef< CTaxon3_reply >(const vector< CRef< COrg_ref > > &list)> taxupdate_func_t
bool ContainsSgml(const string &str)
bool x_CompareConsecutiveIntervals(const CPacked_seqint &packed_int, CConstRef< CSeq_interval > &int_cur, CConstRef< CSeq_interval > &int_prv, CScope *scope, CompareConsecutiveIntervalProc compar)
bool x_IsNotAdjacent(const CSeq_interval &int_cur, const CSeq_interval &int_prv, CScope *scope)
bool x_IsCorrectlyOrdered(const CSeq_interval &int_cur, const CSeq_interval &int_prv, CScope *scope)
bool CheckConsecutiveIntervals(const CSeq_loc &loc, CScope &scope, CompareConsecutiveIntervalProc compar)
bool(* CompareConsecutiveIntervalProc)(const CSeq_interval &int1, const CSeq_interval &int2, CScope *scope)
bool IsNotDuplicateInterval(const CSeq_interval &int1, const CSeq_interval &int2, CScope *scope)
bool x_SameStrand(const CSeq_interval &int1, const CSeq_interval &int2)