NCBI C++ ToolKit
|
Search Toolkit Book for CSubSource
#include <objects/seqfeat/SubSource.hpp>
Public Member Functions | |
CSubSource (void) | |
CSubSource (TSubtype subtype, const TName &name) | |
CSubSource (const string &subtype, const TName &name) | |
~CSubSource (void) | |
void | GetLabel (string *str) const |
void | FixCapitalization () |
void | AutoFix () |
void | RemoveCultureNotes (bool is_species_level=true) |
![]() | |
CSubSource_Base (void) | |
virtual | ~CSubSource_Base (void) |
DECLARE_INTERNAL_TYPE_INFO () | |
bool | IsSetSubtype (void) const |
Check if a value has been assigned to Subtype data member. More... | |
bool | CanGetSubtype (void) const |
Check if it is safe to call GetSubtype method. More... | |
void | ResetSubtype (void) |
Reset Subtype data member. More... | |
TSubtype | GetSubtype (void) const |
Get the Subtype member data. More... | |
void | SetSubtype (TSubtype value) |
Assign a value to Subtype data member. More... | |
TSubtype & | SetSubtype (void) |
Assign a value to Subtype data member. More... | |
bool | IsSetName (void) const |
Check if a value has been assigned to Name data member. More... | |
bool | CanGetName (void) const |
Check if it is safe to call GetName method. More... | |
void | ResetName (void) |
Reset Name data member. More... | |
const TName & | GetName (void) const |
Get the Name member data. More... | |
void | SetName (const TName &value) |
Assign a value to Name data member. More... | |
void | SetName (TName &&value) |
TName & | SetName (void) |
Assign a value to Name data member. More... | |
bool | IsSetAttrib (void) const |
attribution/source of this name Check if a value has been assigned to Attrib data member. More... | |
bool | CanGetAttrib (void) const |
Check if it is safe to call GetAttrib method. More... | |
void | ResetAttrib (void) |
Reset Attrib data member. More... | |
const TAttrib & | GetAttrib (void) const |
Get the Attrib member data. More... | |
void | SetAttrib (const TAttrib &value) |
Assign a value to Attrib data member. More... | |
void | SetAttrib (TAttrib &&value) |
TAttrib & | SetAttrib (void) |
Assign a value to Attrib data member. More... | |
virtual void | Reset (void) |
Reset the whole object. More... | |
![]() | |
CSerialObject (void) | |
virtual | ~CSerialObject (void) |
virtual const CTypeInfo * | GetThisTypeInfo (void) const =0 |
virtual void | Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive) |
Set object to copy of another one. More... | |
virtual bool | Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const |
Check if both objects contain the same values. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
void | ThrowUnassigned (TMemberIndex index) const |
void | ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const |
bool | HasNamespaceName (void) const |
Check if object data type has namespace name. More... | |
const string & | GetNamespaceName (void) const |
Get namespace name. More... | |
bool | HasNamespacePrefix (void) const |
Check if data type has namespace prefix. More... | |
const string & | GetNamespacePrefix (void) const |
Get namespace prefix. More... | |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
![]() | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Private Types | |
typedef CSubSource_Base | Tparent |
Private Member Functions | |
CSubSource (const CSubSource &value) | |
CSubSource & | operator= (const CSubSource &value) |
Static Private Member Functions | |
static string | x_ParseDateRangeWithDelimiter (const string &orig_date, CTempString delim) |
static vector< string > | x_GetDateTokens (const string &orig_date) |
static CLatLonCountryId * | x_CalculateLatLonId (float lat_value, float lon_value, string country, string province) |
static bool | x_IsFixableIsoDate (const string &orig_date) |
static string | x_RemoveIsoTime (const string &orig_date) |
static int | x_GetPrecision (const string &num_str) |
static string | x_FormatWithPrecision (double val, int precision) |
static bool | x_GenericRepliconNameValid (const string &value) |
static bool | x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules (const string &value, const string &taxname) |
Static Private Attributes | |
static unique_ptr< CLatLonCountryMap > | m_LatLonCountryMap |
static unique_ptr< CLatLonCountryMap > | m_LatLonWaterMap |
Additional Inherited Members | |
![]() | |
static const char * | ms_UnassignedStr = "<*unassigned*>" |
static const char | ms_UnassignedByte = char(0xcd) |
![]() | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 64 of file SubSource.hpp.
|
private |
Definition at line 66 of file SubSource.hpp.
Enumerator | |
---|---|
eDateFormatFlag_ok | |
eDateFormatFlag_bad_format | |
eDateFormatFlag_in_future | |
eDateFormatFlag_out_of_order |
Definition at line 107 of file SubSource.hpp.
Enumerator | |
---|---|
eLatLonCountryErr_None | |
eLatLonCountryErr_Country | |
eLatLonCountryErr_State | |
eLatLonCountryErr_Water | |
eLatLonCountryErr_Value |
Definition at line 186 of file SubSource.hpp.
Enumerator | |
---|---|
eVocabulary_raw | |
eVocabulary_insdc |
Definition at line 78 of file SubSource.hpp.
|
inline |
Definition at line 253 of file SubSource.hpp.
Definition at line 258 of file SubSource.hpp.
References CSubSource_Base::SetName(), and CSubSource_Base::SetSubtype().
Definition at line 265 of file SubSource.hpp.
References GetSubtypeValue(), CSubSource_Base::SetName(), and CSubSource_Base::SetSubtype().
CSubSource::~CSubSource | ( | void | ) |
Definition at line 63 of file SubSource.cpp.
|
private |
void CSubSource::AutoFix | ( | ) |
Definition at line 5056 of file SubSource.cpp.
References NStr::Equal(), CSubSource_Base::eSubtype_sex, CSubSource_Base::GetName(), CSubSource_Base::GetSubtype(), NStr::IsBlank(), CSubSource_Base::IsSetName(), CSubSource_Base::IsSetSubtype(), CSubSource_Base::SetName(), and NStr::ToLower().
Referenced by CBioSource::ShouldIgnoreConflict().
Definition at line 5030 of file SubSource.cpp.
References CSubSource_Base::eSubtype_altitude, CSubSource_Base::eSubtype_collection_date, CSubSource_Base::eSubtype_country, CSubSource_Base::eSubtype_lat_lon, CSubSource_Base::eSubtype_sex, FixAltitude(), FixDateFormat(), FixLatLonFormat(), FixSexQualifierValue(), CCountries::NewFixCountry(), and value.
Referenced by BOOST_AUTO_TEST_CASE(), and CNewCleanup_imp::x_SubSourceBC().
Definition at line 2921 of file SubSource.cpp.
References first(), NStr::IsBlank(), s_CellLineContaminationMap, s_InitializeCellLineContaminationMap(), and NStr::ToUpper().
Referenced by BOOST_AUTO_TEST_CASE(), and CValidError_imp::ValidateBioSource().
Definition at line 471 of file SubSource.cpp.
References CDate::Compare(), DateFromCollectionDate(), CDate::eCompare_before, eDateFormatFlag_bad_format, eDateFormatFlag_in_future, eDateFormatFlag_ok, eDateFormatFlag_out_of_order, NStr::Find(), IsCollectionDateAfterTime(), IsISOFormatDate(), NPOS, NStr::Split(), and t.
Definition at line 253 of file SubSource.cpp.
References eUnknown, NStr::Find(), NStr::IsBlank(), CTime::MonthNameToNum(), NCBI_THROW, NPOS, CDate_std_Base::SetDay(), CDate_std_Base::SetMonth(), CDate_Base::SetStd(), CDate_std_Base::SetYear(), str(), NStr::StringToInt(), t, test(), and NStr::TruncateSpaces().
Referenced by BOOST_AUTO_TEST_CASE(), CheckDateFormat(), CApplyPubQualTreeItemData::GetVariables(), IsCollectionDateAfterTime(), IsCorrectDateFormat(), CCleanup::s_CleanupGenomeAssembly(), CBioSource::ShouldIgnoreConflict(), and CMacroFunction_SetPubDate::x_AddDate().
|
static |
Definition at line 1142 of file SubSource.cpp.
References eDay, eMonth, eYear, ITERATE, NStr::StringToInt(), and x_GetDateTokens().
Referenced by BOOST_AUTO_TEST_CASE(), CMacroFunction_FixFormat::TheFunction(), and CMacroFunction_SetPubDate::x_AddDate().
Definition at line 2656 of file SubSource.cpp.
References NStr::Equal(), NStr::IsBlank(), kEmptyStr, number, precision, s_CollectNumberAndUnits(), NStr::StringToDouble(), val, value, x_FormatWithPrecision(), and x_GetPrecision().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), and CMacroFunction_FixFormat::s_ConvertAltitudeToMeters().
void CSubSource::FixCapitalization | ( | ) |
Definition at line 5002 of file SubSource.cpp.
References NStr::Equal(), CSubSource_Base::eSubtype_sex, CSubSource_Base::GetName(), CSubSource_Base::GetSubtype(), NStr::IsBlank(), CSubSource_Base::IsSetName(), CSubSource_Base::IsSetSubtype(), CSubSource_Base::SetName(), and NStr::ToLower().
Definition at line 4969 of file SubSource.cpp.
References CSubSource_Base::eSubtype_cell_type, CSubSource_Base::eSubtype_dev_stage, CSubSource_Base::eSubtype_isolation_source, CSubSource_Base::eSubtype_lab_host, CSubSource_Base::eSubtype_sex, CSubSource_Base::eSubtype_tissue_type, FixCellTypeCapitalization(), FixDevStageCapitalization(), FixIsolationSourceCapitalization(), FixLabHostCapitalization(), FixSexQualifierValue(), FixTissueTypeCapitalization(), NStr::IsBlank(), and value.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 4829 of file SubSource.cpp.
References value.
Referenced by BOOST_AUTO_TEST_CASE(), FixCapitalization(), FixIsolationSourceCapitalization(), and FixTissueTypeCapitalization().
Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined.
orig_date | The original date [in] Rules: First, check to see if the string matches the ISO format (YYYY-MM-DD); if so then just return original string as this is valid. Second, try to split the string into tokens using the following delimiters: * space * comma (,) * dash (-) * slash (/) * underscore (_) * equals (=) * period (.) If more than three tokens are generated, fail and return empty string. Of the tokens that are generated, look for a token that contains letters. If there is such a token, this token is assumed to be the month, and will be checked to see if it begins with any of the three-letter abbreviations for months (Jan, Feb, Mar, etc.). If so, the month is known. If none of the abbreviations produce a match, fail and return an empty string. If more than one token that contains letters is found, return an empty string. If there are no tokens that contain letters, try to determine which token is the month by eliminating tokens that would be year or day. Any token that is a number and has a value greater than 31 will be assumed to be the year. If there is more than one such token, return an empty string. After making this initial pass, try to guess the identities of the remaining tokens. Numbers between 1 and 12 could be considered months, if no month token containing letters was already identified. If two or more such tokens are found, the date is ambiguous: return an empty string, unless one of these two conditions are met: a) the numbers are equal, in which case ambiguity about placement is irrelevant b) if one token is NOT zero-padded and less than 10, and the other is either 10 or more or IS zero-padded, then the token that is not padded and less than 10 is the day, and the other is the year, to which we should add 2000 If a number is between 1 and 31, it could be considered the day. If two such tokens are found, the date is ambiguous: return an empty string. If there is a number that cannot be the month or the day, assume that this is the year. If the year is less than 100, this may be a two-digit representation. If 2000 + the value is not in the future, use this as the year, otherwise use 1900 + the value for the year. If all tokens can be identified, arrange them in the output string in one of the following formats: YYYY Mmm-YYYY DD-Mmm-YYYY |
Definition at line 586 of file SubSource.cpp.
References ArraySize(), i, NStr::IsBlank(), and x_ParseDateRangeWithDelimiter().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), CCleanup::CleanupCollectionDates(), CCleanup::s_CleanupGenomeAssembly(), CMacroFunction_FixFormat::TheFunction(), CMacroFunction_SetPubDate::x_AddDate(), CParseCollectionDateFormats::x_ApplyToBioSource(), and x_ParseDateRangeWithDelimiter().
|
static |
Definition at line 923 of file SubSource.cpp.
References CTime::eAbbr, NStr::EndsWith(), NStr::EqualNocase(), isalpha(), NStr::IsBlank(), IsCorrectDateFormat(), IsDayValueOkForMonth(), isdigit(), IsISOFormatDate(), kEmptyStr, max(), min(), CTime::MonthNameToNum(), CTime::MonthNumToName(), NStr::NumericToString(), s_ChooseMonthAndDay(), NStr::StartsWith(), NStr::StringToInt(), test(), NStr::TruncateSpacesInPlace(), val, x_GetDateTokens(), x_IsFixableIsoDate(), and x_RemoveIsoTime().
Definition at line 4808 of file SubSource.cpp.
References value.
Referenced by BOOST_AUTO_TEST_CASE(), FixCapitalization(), FixIsolationSourceCapitalization(), and FixTissueTypeCapitalization().
Definition at line 4909 of file SubSource.cpp.
References map_checker< Container >::end(), NStr::EqualNocase(), map_checker< Container >::find(), FixCellTypeCapitalization(), FixDevStageCapitalization(), COrgMod::FixHostCapitalization(), i, max(), s_InitializeQualMaps(), s_IsolationSourceMap, sm_ValidSexQualifierTokens, and value.
Referenced by BOOST_AUTO_TEST_CASE(), and FixCapitalization().
Definition at line 4963 of file SubSource.cpp.
References COrgMod::FixHostCapitalization(), and value.
Referenced by FixCapitalization().
Definition at line 1828 of file SubSource.cpp.
References CUtf8::AsUTF8(), CUtf8::GuessEncoding(), MakeLatLon(), NStr::ParseEscapes(), precision, NStr::ReplaceInPlace(), s_GetLatLong(), s_InsertSpacesBetweenTokens(), s_RemoveSpacesWithinNumbers(), s_ShortenLatLon(), NStr::Sanitize(), NStr::StartsWith(), NStr::TrimPrefixInPlace(), and NStr::TrimSuffixInPlace().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), CLatLonTool::GetValuesTableFromSeqEntry(), and CMacroFunction_FixFormat::s_FixLatLonFormat().
Definition at line 1270 of file SubSource.cpp.
References fabs, IsCorrectLatLonFormat(), kEmptyStr, orig, NStr::Split(), and x_GetPrecision().
Definition at line 2493 of file SubSource.cpp.
References ArraySize(), NStr::Equal(), NStr::EqualNocase(), i, ITERATE, kEmptyStr, max(), s_IsValidSexQualifierPhrase(), sm_ValidSexQualifierTokens, NStr::Split(), str(), NStr::ToLower(), and value.
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), and FixCapitalization().
Definition at line 4936 of file SubSource.cpp.
References map_checker< Container >::end(), NStr::EqualNocase(), map_checker< Container >::find(), FixCellTypeCapitalization(), FixDevStageCapitalization(), COrgMod::FixHostCapitalization(), i, max(), s_InitializeQualMaps(), s_IsolationSourceMap, sm_ValidSexQualifierTokens, and value.
Referenced by BOOST_AUTO_TEST_CASE(), and FixCapitalization().
Referenced by BOOST_AUTO_TEST_CASE(), and CValidError_imp::ValidateSubSource().
Definition at line 797 of file SubSource.cpp.
References CDate_std_Base::SetDay(), CDate_std_Base::SetMonth(), CDate_Base::SetStd(), CDate_std_Base::SetYear(), NStr::StringToInt(), and NStr::TruncateSpacesInPlace().
Referenced by CAutoColValidatordate::DoValidate().
void CSubSource::GetLabel | ( | string * | str | ) | const |
Definition at line 67 of file SubSource.cpp.
References CSubSource_Base::eSubtype_other, CSubSource_Base::GetAttrib(), CSubSource_Base::GetName(), CSubSource_Base::GetSubtype(), GetSubtypeName(), CSubSource_Base::IsSetAttrib(), and str().
|
static |
Definition at line 151 of file SubSource.cpp.
References ENUM_METHOD_NAME, CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_other, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_subclone, CSubSource_Base::eSubtype_transposon_name, eVocabulary_insdc, and NStr::Replace().
Referenced by AddBioSourceToAttributes(), CFieldChoicePanel::AutoMatchSrc(), GetLabel(), GetSeqTableFromSeqEntry(), CWriteUtil::GetSubSourceSubType(), GetSubtypeName(), CGuiObjectInfoComponent::GetToolTip(), UpdateBiosourceFromBiosample(), CValidError_imp::ValidateBioSource(), CValidError_imp::ValidateSubSource(), CSourceFieldNamePanel::x_ChooseTextQualifier(), CSrcModListPanel::x_FillDataList(), CMacroEditorContext::x_GetBsrcTextFieldnames(), CBioSource::x_GetSubtypeNameValPairs(), and CAutoDefOptions::x_MakeModifierList().
|
static |
Definition at line 94 of file SubSource.cpp.
References ENUM_METHOD_NAME, NStr::EqualNocase(), CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_other, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_subclone, CSubSource_Base::eSubtype_transposon_name, eVocabulary_insdc, str(), NStr::ToLower(), and NStr::TruncateSpaces().
Referenced by CFieldChoicePanel::AutoMatchSrc(), CSrcTableColumnBaseFactory::Create(), CreateActionBiosource(), CSubSource(), CSubSrcQual::CSubSrcQual(), CAutoColValidatorsubsource::DoValidate(), CSourceFieldNamePanel::GetChoices(), SrcEditDialog::GetLabelForTitle(), CColumnValidator::IsDiscouraged(), CCompareWithBiosample::OnClickOk(), s_SetBioSourceField(), s_StringHasSubSourcePrefix(), CSourceFieldNamePanel::SetFieldName(), CBioSource::ShouldIgnoreConflict(), CBioSource::UpdateWithBioSample(), CMacroFunction_AddorSetContElement::x_AddBioSrcModifier(), CMacroFunction_Autodef::x_IsRequested(), CMacroFunction_AutodefComplete::x_IsRequested(), CSrcModListPanel::x_SetBioSourceModifier(), CAutoDefOptions::x_SetModifierList(), and CSrcWriter::xGatherSubtypeFeat().
Definition at line 5128 of file SubSource.cpp.
References NStr::EqualNocase(), NStr::FindNoCase(), i, NULL, s_RemovableCultureNotes, s_ReplaceableCultureNotes, and value.
Definition at line 2619 of file SubSource.cpp.
References NStr::EqualCase(), NStr::IsBlank(), number, s_CollectNumberAndUnits(), and value.
Referenced by CValidError_imp::ValidateBioSource().
Definition at line 2812 of file SubSource.cpp.
References NStr::eNocase, NStr::IsBlank(), NStr::StartsWith(), value, and x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules().
Referenced by CValidError_imp::ValidateSubSource().
Definition at line 413 of file SubSource.cpp.
References CTime::GetTimeT(), IsCollectionDateAfterTime(), and t.
Definition at line 402 of file SubSource.cpp.
References CDate::Compare(), CDate::eCompare_after, and t.
|
static |
Definition at line 380 of file SubSource.cpp.
References DateFromCollectionDate(), ITERATE, NStr::Split(), and t.
Referenced by CheckDateFormat(), IsCollectionDateAfterTime(), IsCorrectDateFormat(), and CValidError_imp::ValidateCitSub().
|
static |
Definition at line 420 of file SubSource.cpp.
References DateFromCollectionDate(), NStr::Find(), IsCollectionDateAfterTime(), IsISOFormatDate(), NPOS, NStr::Split(), and t.
Referenced by BOOST_AUTO_TEST_CASE(), FixDateFormat(), and GetHasCollectionDate().
|
static |
Definition at line 1203 of file SubSource.cpp.
References NStr::IsBlank(), len, NStr::Split(), NStr::StartsWith(), and x_GetPrecision().
Referenced by BOOST_AUTO_TEST_CASE(), FixLatLonPrecision(), CMacroFunction_FixFormat::s_FixLatLonFormat(), CBioSource::ShouldIgnoreConflict(), CValidError_imp::ValidateBioSource(), ValidateLatLonCountry(), and CValidError_imp::ValidateSubSource().
Determine whether day number could occur in month.
day | The number of the day, 1-based [in] |
month | The number of the month, 1-based [in] |
year | The number of the year, 1-based [in] |
Definition at line 232 of file SubSource.cpp.
References CTime::DaysInMonth().
Referenced by FixDateFormat(), and IsISOFormatDateOnly().
Definition at line 213 of file SubSource.cpp.
References CSubSource_Base::eSubtype_frequency, CSubSource_Base::eSubtype_fwd_primer_name, CSubSource_Base::eSubtype_fwd_primer_seq, CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_phenotype, CSubSource_Base::eSubtype_plastid_name, CSubSource_Base::eSubtype_rev_primer_name, CSubSource_Base::eSubtype_rev_primer_seq, CSubSource_Base::eSubtype_transposon_name, and CSubSource_Base::eSubtype_whole_replicon.
Referenced by CSrcModPanel::DoNotListSubSrc(), CColumnValidator::IsDiscouraged(), s_MustCopy(), s_StringHasSubSourcePrefix(), CSourceFieldNamePanel::x_ChooseTextQualifier(), CMacroEditorContext::x_GetBsrcTextFieldnames(), and CSrcWriter::xIsSubsourceTypeSuppressed().
Definition at line 2719 of file SubSource.cpp.
References value, and x_GenericRepliconNameValid().
Referenced by CValidError_imp::ValidateSubSource().
Definition at line 782 of file SubSource.cpp.
References NStr::Find(), IsISOFormatDateOnly(), IsISOFormatTime(), NPOS, and NStr::TruncateSpacesInPlace().
Referenced by CheckDateFormat(), CAutoColValidatordate::DoValidate(), FixDateFormat(), and IsCorrectDateFormat().
Definition at line 705 of file SubSource.cpp.
References IsDayValueOkForMonth(), isdigit(), and NStr::StringToInt().
Referenced by IsISOFormatDate(), and x_IsFixableIsoDate().
|
static |
Definition at line 610 of file SubSource.cpp.
References NStr::Find(), isdigit(), min(), NPOS, NStr::StringToInt(), and suffix.
Referenced by BOOST_AUTO_TEST_CASE(), IsISOFormatDate(), and x_IsFixableIsoDate().
Definition at line 2825 of file SubSource.cpp.
References NStr::IsBlank(), value, and x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules().
Referenced by CValidError_imp::ValidateSubSource().
Definition at line 174 of file SubSource.cpp.
References CSubSource_Base::eSubtype_altitude, CSubSource_Base::eSubtype_chromosome, CSubSource_Base::eSubtype_clone, CSubSource_Base::eSubtype_collected_by, CSubSource_Base::eSubtype_collection_date, CSubSource_Base::eSubtype_country, CSubSource_Base::eSubtype_environmental_sample, CSubSource_Base::eSubtype_fwd_primer_name, CSubSource_Base::eSubtype_fwd_primer_seq, CSubSource_Base::eSubtype_germline, CSubSource_Base::eSubtype_identified_by, CSubSource_Base::eSubtype_lat_lon, CSubSource_Base::eSubtype_metagenomic, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_rearranged, CSubSource_Base::eSubtype_rev_primer_name, CSubSource_Base::eSubtype_rev_primer_seq, CSubSource_Base::eSubtype_segment, CSubSource_Base::eSubtype_sex, and CSubSource_Base::eSubtype_transgenic.
Referenced by CValidError_imp::ValidateBioSource(), and CSourceModParser::x_ApplyMods().
Definition at line 2837 of file SubSource.cpp.
References NStr::Equal(), NStr::Find(), set< Key, Compare >::find(), NStr::FindNoCase(), NStr::IsBlank(), NPOS, NStr::StartsWith(), value, and x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules().
Referenced by BOOST_AUTO_TEST_CASE(), and CValidError_imp::ValidateSubSource().
Definition at line 2713 of file SubSource.cpp.
References value, and x_GenericRepliconNameValid().
Referenced by CValidError_imp::ValidateSubSource().
Definition at line 2454 of file SubSource.cpp.
References NStr::Equal(), ITERATE, max(), s_IsValidSexQualifierPhrase(), sm_ValidSexQualifierTokens, NStr::Split(), str(), NStr::ToLower(), and value.
Referenced by BOOST_AUTO_TEST_CASE(), CBioSource::FixSexMatingTypeInconsistencies(), and CValidError_imp::ValidateBioSource().
|
static |
Definition at line 123 of file SubSource.cpp.
References ENUM_METHOD_NAME, NStr::EqualNocase(), eVocabulary_insdc, str(), NStr::ToLower(), and NStr::TruncateSpaces().
Referenced by CFieldChoicePanel::AutoMatchSrc(), CSrcTableColumnBaseFactory::Create(), CreateActionBiosource(), CSourceFieldNamePanel::GetChoices(), NMItemData::GetEditableFieldForPair(), SrcEditDialog::GetLabelForTitle(), CSourceFieldNamePanel::GetMacroFieldName(), NMacroUtil::IsBiosourceModifier(), s_SetBioSourceField(), CSourceFieldNamePanel::SetFieldName(), CMacroFunction_AddorSetContElement::x_AddBioSrcModifier(), CMacroEditorContext::x_GetAsnPathToBsrcText(), CMacroEditorContext::x_GetGUIFieldForBsrcText(), CMacroFunction_Autodef::x_IsRequested(), CMacroFunction_AutodefComplete::x_IsRequested(), and CSrcModListPanel::x_SetBioSourceModifier().
|
static |
Definition at line 1856 of file SubSource.cpp.
References NStr::DoubleToString(), and NStr::TrimSuffixInPlace().
Referenced by FixLatLonFormat(), and ValidateLatLonCountry().
Definition at line 199 of file SubSource.cpp.
References CSubSource_Base::eSubtype_environmental_sample, CSubSource_Base::eSubtype_germline, CSubSource_Base::eSubtype_metagenomic, CSubSource_Base::eSubtype_rearranged, and CSubSource_Base::eSubtype_transgenic.
Referenced by AddBioSourceToAttributes(), CBioSource::AutoFix(), CNewCleanup_imp::BiosourceBC(), CSourceFieldNamePanel::GetChoices(), GetSeqTableFromSeqEntry(), CSrcTableSubSourceColumn::GetValsFromBioSource(), s_StringHasSubSourcePrefix(), s_SubsourceEqual(), s_SubsourceEquivalent(), CBioSource::UpdateWithBioSample(), CValidError_imp::ValidateSubSource(), CSourceModParser::x_ApplyMods(), CBioSource::x_GetSubtypeNameValPairs(), CNewCleanup_imp::x_PostBiosource(), CDescrModApply::x_SetSubtype(), and CSrcWriter::xGatherSubtypeFeat().
|
private |
Definition at line 5180 of file SubSource.cpp.
References CSubSource_Base::GetName(), NStr::IsBlank(), CSubSource_Base::IsSetName(), RemoveCultureNotes(), CSubSource_Base::ResetName(), and CSubSource_Base::SetName().
Definition at line 5145 of file SubSource.cpp.
References NStr::EndsWith(), NStr::EqualNocase(), NStr::FindNoCase(), i, NStr::IsBlank(), NPOS, NULL, s_RemovableCultureNotes, s_ReplaceableCultureNotes, NStr::StartsWith(), and value.
Referenced by BOOST_AUTO_TEST_CASE(), CBioSource::RemoveCultureNotes(), and RemoveCultureNotes().
|
static |
Definition at line 2067 of file SubSource.cpp.
References check_state(), CLatLonCountryId::Classify(), eLatLonCountryErr_Country, eLatLonCountryErr_None, eLatLonCountryErr_State, eLatLonCountryErr_Value, eLatLonCountryErr_Water, NStr::eNocase, NStr::Equal(), NStr::EqualNocase(), NStr::eReverseSearch, NStr::eTrunc_Both, CLatLonCountryId::fCountryClosest, CLatLonCountryId::fCountryMatch, CLatLonCountryMap::fFlip, NStr::Find(), flags, CLatLonCountryMap::fNegateLat, CLatLonCountryMap::fNegateLon, CLatLonCountryMap::fNone, CLatLonCountryId::fProvinceClosest, CLatLonCountryId::fProvinceMatch, CLatLonCountryId::fWaterMatch, g(), CLatLonCountryId::GetClaimedDistance(), CLatLonCountryId::GetClaimedFull(), CLatLonCountryId::GetClosestCountry(), CLatLonCountryId::GetClosestWater(), CLatLonCountryId::GetGuessCountry(), CLatLonCountryId::GetGuessProvince(), CLatLonCountryId::GetGuessWater(), CLatLonCountryId::GetLandDistance(), NStr::IntToString(), NStr::IsBlank(), IsCorrectLatLonFormat(), kEmptyStr, m_LatLonCountryMap, m_LatLonWaterMap, MakeLatLon(), NPOS, NULL, NStr::StartsWith(), NStr::TruncateSpacesInPlace(), x_CalculateLatLonId(), and x_FindSurroundingOcean().
Referenced by BOOST_AUTO_TEST_CASE(), CCountryConflict::GetValuesTableFromSeqEntry(), and CValidError_imp::ValidateLatLonCountry().
|
staticprivate |
Definition at line 1878 of file SubSource.cpp.
References NStr::EqualNocase(), ErrorDistance(), CLatLonCountryId::GetClosestCountry(), CLatLonCountryId::GetClosestWater(), CCountryExtreme::GetCountry(), CLatLonCountryId::GetGuessCountry(), CLatLonCountryId::GetGuessProvince(), CLatLonCountryId::GetGuessWater(), CCountryExtreme::GetLevel0(), CCountryExtreme::GetLevel1(), NStr::IsBlank(), m_LatLonCountryMap, and m_LatLonWaterMap.
Referenced by ValidateLatLonCountry().
Definition at line 2648 of file SubSource.cpp.
References precision, and val.
Referenced by FixAltitude().
Definition at line 2693 of file SubSource.cpp.
References isalnum(), NStr::IsBlank(), isprint(), and value.
Referenced by IsEndogenousVirusNameValid(), IsSegmentValid(), and x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules().
Definition at line 818 of file SubSource.cpp.
References NStr::EqualNocase(), isalpha(), NStr::IsBlank(), isdigit(), ITERATE, NPOS, and NStr::TruncateSpacesInPlace().
Referenced by DetectDateFormat(), and FixDateFormat().
Definition at line 2637 of file SubSource.cpp.
References NStr::Find(), int, NPOS, and precision.
Referenced by FixAltitude(), FixLatLonPrecision(), and IsCorrectLatLonFormat().
Definition at line 745 of file SubSource.cpp.
References NStr::Find(), IsISOFormatDateOnly(), IsISOFormatTime(), NPOS, and NStr::TruncateSpacesInPlace().
Referenced by FixDateFormat().
|
staticprivate |
Definition at line 2771 of file SubSource.cpp.
References NStr::FindNoCase(), NPOS, s_FailsGenusOrSpeciesTest(), NStr::StartsWith(), value, and x_GenericRepliconNameValid().
Referenced by IsChromosomeNameValid(), IsLinkageGroupNameValid(), and IsPlasmidNameValid().
|
staticprivate |
Definition at line 562 of file SubSource.cpp.
References NStr::eNocase, NStr::Find(), FixDateFormat(), NStr::IsBlank(), kEmptyStr, CTempString::length(), and NPOS.
Referenced by FixDateFormat().
Definition at line 770 of file SubSource.cpp.
References NStr::Find(), NPOS, and NStr::TruncateSpacesInPlace().
Referenced by FixDateFormat().
|
staticprivate |
Definition at line 244 of file SubSource.hpp.
Referenced by ValidateLatLonCountry(), and x_CalculateLatLonId().
|
staticprivate |
Definition at line 245 of file SubSource.hpp.
Referenced by ValidateLatLonCountry(), and x_CalculateLatLonId().