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

Represents ASN.1 type SubSource defined in file seqfeat.asn

Search Toolkit Book for CSubSource

#include <objects/seqfeat/SubSource.hpp>

+ Inheritance diagram for CSubSource:
+ Collaboration diagram for CSubSource:

Public Types

enum  EVocabulary { eVocabulary_raw , eVocabulary_insdc }
 
enum  EDateFormatFlag { eDateFormatFlag_ok = 0 , eDateFormatFlag_bad_format = 1 , eDateFormatFlag_in_future = 2 , eDateFormatFlag_out_of_order = 4 }
 
enum  ELatLonCountryErr {
  eLatLonCountryErr_None = 0 , eLatLonCountryErr_Country , eLatLonCountryErr_State , eLatLonCountryErr_Water ,
  eLatLonCountryErr_Value
}
 
- Public Types inherited from CSubSource_Base
enum  ESubtype {
  eSubtype_chromosome = 1 , eSubtype_map = 2 , eSubtype_clone = 3 , eSubtype_subclone = 4 ,
  eSubtype_haplotype = 5 , eSubtype_genotype = 6 , eSubtype_sex = 7 , eSubtype_cell_line = 8 ,
  eSubtype_cell_type = 9 , eSubtype_tissue_type = 10 , eSubtype_clone_lib = 11 , eSubtype_dev_stage = 12 ,
  eSubtype_frequency = 13 , eSubtype_germline = 14 , eSubtype_rearranged = 15 , eSubtype_lab_host = 16 ,
  eSubtype_pop_variant = 17 , eSubtype_tissue_lib = 18 , eSubtype_plasmid_name = 19 , eSubtype_transposon_name = 20 ,
  eSubtype_insertion_seq_name = 21 , eSubtype_plastid_name = 22 , eSubtype_country = 23 , eSubtype_segment = 24 ,
  eSubtype_endogenous_virus_name = 25 , eSubtype_transgenic = 26 , eSubtype_environmental_sample = 27 , eSubtype_isolation_source = 28 ,
  eSubtype_lat_lon = 29 , eSubtype_collection_date = 30 , eSubtype_collected_by = 31 , eSubtype_identified_by = 32 ,
  eSubtype_fwd_primer_seq = 33 , eSubtype_rev_primer_seq = 34 , eSubtype_fwd_primer_name = 35 , eSubtype_rev_primer_name = 36 ,
  eSubtype_metagenomic = 37 , eSubtype_mating_type = 38 , eSubtype_linkage_group = 39 , eSubtype_haplogroup = 40 ,
  eSubtype_whole_replicon = 41 , eSubtype_phenotype = 42 , eSubtype_altitude = 43 , eSubtype_other = 255
}
 
enum class  E_memberIndex { e__allMandatory = 0 , e_subtype , e_name , e_attrib }
 
typedef int TSubtype
 
typedef string TName
 
typedef string TAttrib
 
typedef Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

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)
 
- Public Member Functions inherited from CSubSource_Base
 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...
 
TSubtypeSetSubtype (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 TNameGetName (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)
 
TNameSetName (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 TAttribGetAttrib (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)
 
TAttribSetAttrib (void)
 Assign a value to Attrib data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (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 stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (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...
 
- Public Member Functions inherited from CDebugDumpable
 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
 

Static Public Member Functions

static bool NCBI_UseGeoLocNameForCountry (void)
 
static TSubtype GetSubtypeValue (const string &str, EVocabulary vocabulary=eVocabulary_raw)
 
static string GetSubtypeName (CSubSource::TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
 
static bool IsValidSubtypeName (const string &str, EVocabulary vocabulary=eVocabulary_raw)
 
static bool IsMultipleValuesAllowed (TSubtype)
 
static bool NeedsNoText (const TSubtype &subtype)
 
static bool IsDiscouraged (const TSubtype subtype)
 
static CRef< CDateDateFromCollectionDate (const string &str) THROWS((CException))
 
static void IsCorrectDateFormat (const string &date_string, bool &bad_format, bool &in_future)
 
static size_t CheckDateFormat (const string &date_string)
 
static string GetCollectionDateProblem (const string &date_string)
 
static bool IsCollectionDateAfterTime (const string &collection_date, time_t t, bool &bad_format)
 
static bool IsCollectionDateAfterTime (const CDate &collection_date, time_t t)
 
static bool IsCollectionDateAfterTime (const CDate &collection_date, CTime &ctime)
 
static bool IsISOFormatTime (const string &orig_time, int &hour, int &min, int &sec, bool require_time_zone=true)
 
static bool IsISOFormatDateOnly (const string &date)
 
static bool IsISOFormatDate (const string &orig_date)
 
static CRef< CDateGetDateFromISODate (const string &orig_date)
 
static bool IsDayValueOkForMonth (int day, int month, int year)
 Determine whether day number could occur in month. More...
 
static string FixDateFormat (const string &orig_date)
 Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined. More...
 
static string FixDateFormat (const string &orig_date, bool month_first, bool &month_ambiguous)
 
static void DetectDateFormat (const string &orig_date, bool &ambiguous, bool &day_first)
 
static void IsCorrectLatLonFormat (string lat_lon, bool &format_correct, bool &precision_correct, bool &lat_in_range, bool &lon_in_range, double &lat_value, double &lon_value)
 
static string FixLatLonFormat (string orig_lat_lon, bool guess=false)
 
static string MakeLatLon (double lat_value, double lon_value, int lat_precision=2, int lon_precision=2)
 
static string FixLatLonPrecision (const string &orig)
 
static string ValidateLatLonCountry (const string &countryname, string &lat_lon, bool check_state, ELatLonCountryErr &errcode)
 
static bool IsValidSexQualifierValue (const string &value)
 
static string FixSexQualifierValue (const string &value)
 
static bool IsAltitudeValid (const string &value)
 
static string FixAltitude (const string &value)
 
static bool IsPlasmidNameValid (const string &value, const string &taxname)
 
static bool IsChromosomeNameValid (const string &value, const string &taxname)
 
static bool IsLinkageGroupNameValid (const string &value, const string &taxname)
 
static bool IsSegmentValid (const string &value)
 
static bool IsEndogenousVirusNameValid (const string &value)
 
static string FixDevStageCapitalization (const string &value)
 
static string FixCellTypeCapitalization (const string &value)
 
static string FixIsolationSourceCapitalization (const string &value)
 
static string FixTissueTypeCapitalization (const string &value)
 
static string FixLabHostCapitalization (const string &value)
 
static string FixCapitalization (TSubtype subtype, const string &value)
 
static string AutoFix (TSubtype subtype, const string &value)
 
static bool HasCultureNotes (const string &value)
 
static void RemoveCultureNotes (string &value, bool is_species_level=true)
 
static string CheckCellLine (const string &cell_line, const string &organism)
 
- Static Public Member Functions inherited from CSubSource_Base
static const NCBI_NS_NCBI::CEnumeratedTypeValues *ENUM_METHOD_NAME() ESubtype (void)
 Access to ESubtype's attributes (values, names) as defined in spec. More...
 
- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Private Types

typedef CSubSource_Base Tparent
 

Private Member Functions

 CSubSource (const CSubSource &value)
 
CSubSourceoperator= (const CSubSource &value)
 

Static Private Member Functions

static string x_ParseDateRangeWithDelimiter (const string &orig_date, CTempString delim)
 
static vector< stringx_GetDateTokens (const string &orig_date)
 
static CLatLonCountryIdx_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< CLatLonCountryMapm_LatLonCountryMap
 
static unique_ptr< CLatLonCountryMapm_LatLonWaterMap
 

Additional Inherited Members

- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- Static Public Attributes inherited from CObject
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...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 64 of file SubSource.hpp.

Member Typedef Documentation

◆ Tparent

Definition at line 66 of file SubSource.hpp.

Member Enumeration Documentation

◆ EDateFormatFlag

Enumerator
eDateFormatFlag_ok 
eDateFormatFlag_bad_format 
eDateFormatFlag_in_future 
eDateFormatFlag_out_of_order 

Definition at line 110 of file SubSource.hpp.

◆ ELatLonCountryErr

Enumerator
eLatLonCountryErr_None 
eLatLonCountryErr_Country 
eLatLonCountryErr_State 
eLatLonCountryErr_Water 
eLatLonCountryErr_Value 

Definition at line 189 of file SubSource.hpp.

◆ EVocabulary

Enumerator
eVocabulary_raw 
eVocabulary_insdc 

Definition at line 81 of file SubSource.hpp.

Constructor & Destructor Documentation

◆ CSubSource() [1/4]

CSubSource::CSubSource ( void  )
inline

Definition at line 256 of file SubSource.hpp.

◆ CSubSource() [2/4]

CSubSource::CSubSource ( TSubtype  subtype,
const TName name 
)
inline

Definition at line 261 of file SubSource.hpp.

References CSubSource_Base::SetName(), and CSubSource_Base::SetSubtype().

◆ CSubSource() [3/4]

CSubSource::CSubSource ( const string subtype,
const TName name 
)
inline

◆ ~CSubSource()

CSubSource::~CSubSource ( void  )

Definition at line 63 of file SubSource.cpp.

◆ CSubSource() [4/4]

CSubSource::CSubSource ( const CSubSource value)
private

Member Function Documentation

◆ AutoFix() [1/2]

void CSubSource::AutoFix ( )

◆ AutoFix() [2/2]

string CSubSource::AutoFix ( TSubtype  subtype,
const string value 
)
static

◆ CheckCellLine()

string CSubSource::CheckCellLine ( const string cell_line,
const string organism 
)
static

◆ CheckDateFormat()

size_t CSubSource::CheckDateFormat ( const string date_string)
static

◆ DateFromCollectionDate()

CRef< CDate > CSubSource::DateFromCollectionDate ( const string str)
static

◆ DetectDateFormat()

void CSubSource::DetectDateFormat ( const string orig_date,
bool ambiguous,
bool day_first 
)
static

◆ FixAltitude()

string CSubSource::FixAltitude ( const string value)
static

◆ FixCapitalization() [1/2]

void CSubSource::FixCapitalization ( )

◆ FixCapitalization() [2/2]

string CSubSource::FixCapitalization ( TSubtype  subtype,
const string value 
)
static

◆ FixCellTypeCapitalization()

string CSubSource::FixCellTypeCapitalization ( const string value)
static

◆ FixDateFormat() [1/2]

string CSubSource::FixDateFormat ( const string orig_date)
static

Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined.

Parameters
orig_dateThe 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 620 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().

◆ FixDateFormat() [2/2]

string CSubSource::FixDateFormat ( const string orig_date,
bool  month_first,
bool month_ambiguous 
)
static

◆ FixDevStageCapitalization()

string CSubSource::FixDevStageCapitalization ( const string value)
static

◆ FixIsolationSourceCapitalization()

string CSubSource::FixIsolationSourceCapitalization ( const string value)
static

◆ FixLabHostCapitalization()

string CSubSource::FixLabHostCapitalization ( const string value)
static

Definition at line 5010 of file SubSource.cpp.

References COrgMod::FixHostCapitalization(), and rapidjson::value.

Referenced by FixCapitalization().

◆ FixLatLonFormat()

string CSubSource::FixLatLonFormat ( string  orig_lat_lon,
bool  guess = false 
)
static

◆ FixLatLonPrecision()

string CSubSource::FixLatLonPrecision ( const string orig)
static

Definition at line 1304 of file SubSource.cpp.

References fabs, IsCorrectLatLonFormat(), kEmptyStr, orig, NStr::Split(), and x_GetPrecision().

◆ FixSexQualifierValue()

string CSubSource::FixSexQualifierValue ( const string value)
static

◆ FixTissueTypeCapitalization()

string CSubSource::FixTissueTypeCapitalization ( const string value)
static

◆ GetCollectionDateProblem()

static string CSubSource::GetCollectionDateProblem ( const string date_string)
static

◆ GetDateFromISODate()

CRef< CDate > CSubSource::GetDateFromISODate ( const string orig_date)
static

◆ GetLabel()

void CSubSource::GetLabel ( string str) const

◆ GetSubtypeName()

string CSubSource::GetSubtypeName ( CSubSource::TSubtype  stype,
EVocabulary  vocabulary = eVocabulary_raw 
)
static

◆ GetSubtypeValue()

CSubSource::TSubtype CSubSource::GetSubtypeValue ( const string str,
EVocabulary  vocabulary = eVocabulary_raw 
)
static

◆ HasCultureNotes()

bool CSubSource::HasCultureNotes ( const string value)
static

◆ IsAltitudeValid()

bool CSubSource::IsAltitudeValid ( const string value)
static

◆ IsChromosomeNameValid()

bool CSubSource::IsChromosomeNameValid ( const string value,
const string taxname 
)
static

◆ IsCollectionDateAfterTime() [1/3]

bool CSubSource::IsCollectionDateAfterTime ( const CDate collection_date,
CTime ctime 
)
static

Definition at line 447 of file SubSource.cpp.

References CTime::GetTimeT(), IsCollectionDateAfterTime(), and t.

◆ IsCollectionDateAfterTime() [2/3]

bool CSubSource::IsCollectionDateAfterTime ( const CDate collection_date,
time_t  t 
)
static

Definition at line 436 of file SubSource.cpp.

References CDate::Compare(), CDate::eCompare_after, and t.

◆ IsCollectionDateAfterTime() [3/3]

bool CSubSource::IsCollectionDateAfterTime ( const string collection_date,
time_t  t,
bool bad_format 
)
static

◆ IsCorrectDateFormat()

void CSubSource::IsCorrectDateFormat ( const string date_string,
bool bad_format,
bool in_future 
)
static

◆ IsCorrectLatLonFormat()

void CSubSource::IsCorrectLatLonFormat ( string  lat_lon,
bool format_correct,
bool precision_correct,
bool lat_in_range,
bool lon_in_range,
double &  lat_value,
double &  lon_value 
)
static

◆ IsDayValueOkForMonth()

bool CSubSource::IsDayValueOkForMonth ( int  day,
int  month,
int  year 
)
static

Determine whether day number could occur in month.

Parameters
dayThe number of the day, 1-based [in]
monthThe number of the month, 1-based [in]
yearThe number of the year, 1-based [in]

Definition at line 266 of file SubSource.cpp.

References CTime::DaysInMonth().

Referenced by FixDateFormat(), and IsISOFormatDateOnly().

◆ IsDiscouraged()

bool CSubSource::IsDiscouraged ( const TSubtype  subtype)
static

◆ IsEndogenousVirusNameValid()

bool CSubSource::IsEndogenousVirusNameValid ( const string value)
static

Definition at line 2753 of file SubSource.cpp.

References rapidjson::value, and x_GenericRepliconNameValid().

Referenced by CValidError_imp::ValidateSubSource().

◆ IsISOFormatDate()

bool CSubSource::IsISOFormatDate ( const string orig_date)
static

◆ IsISOFormatDateOnly()

bool CSubSource::IsISOFormatDateOnly ( const string date)
static

Definition at line 739 of file SubSource.cpp.

References IsDayValueOkForMonth(), isdigit(), and NStr::StringToInt().

Referenced by IsISOFormatDate(), and x_IsFixableIsoDate().

◆ IsISOFormatTime()

bool CSubSource::IsISOFormatTime ( const string orig_time,
int hour,
int min,
int sec,
bool  require_time_zone = true 
)
static

◆ IsLinkageGroupNameValid()

bool CSubSource::IsLinkageGroupNameValid ( const string value,
const string taxname 
)
static

◆ IsMultipleValuesAllowed()

bool CSubSource::IsMultipleValuesAllowed ( TSubtype  subtype)
static

◆ IsPlasmidNameValid()

bool CSubSource::IsPlasmidNameValid ( const string value,
const string taxname 
)
static

◆ IsSegmentValid()

bool CSubSource::IsSegmentValid ( const string value)
static

Definition at line 2747 of file SubSource.cpp.

References rapidjson::value, and x_GenericRepliconNameValid().

Referenced by CValidError_imp::ValidateSubSource().

◆ IsValidSexQualifierValue()

bool CSubSource::IsValidSexQualifierValue ( const string value)
static

◆ IsValidSubtypeName()

bool CSubSource::IsValidSubtypeName ( const string str,
EVocabulary  vocabulary = eVocabulary_raw 
)
static

◆ MakeLatLon()

string CSubSource::MakeLatLon ( double  lat_value,
double  lon_value,
int  lat_precision = 2,
int  lon_precision = 2 
)
static

Definition at line 1890 of file SubSource.cpp.

References NStr::DoubleToString(), and NStr::TrimSuffixInPlace().

Referenced by FixLatLonFormat(), and ValidateLatLonCountry().

◆ NCBI_UseGeoLocNameForCountry()

bool CSubSource::NCBI_UseGeoLocNameForCountry ( void  )
static

◆ NeedsNoText()

bool CSubSource::NeedsNoText ( const TSubtype subtype)
static

◆ operator=()

CSubSource& CSubSource::operator= ( const CSubSource value)
private

◆ RemoveCultureNotes() [1/2]

void CSubSource::RemoveCultureNotes ( bool  is_species_level = true)

◆ RemoveCultureNotes() [2/2]

void CSubSource::RemoveCultureNotes ( string value,
bool  is_species_level = true 
)
static

◆ ValidateLatLonCountry()

string CSubSource::ValidateLatLonCountry ( const string countryname,
string lat_lon,
bool  check_state,
ELatLonCountryErr errcode 
)
static

◆ x_CalculateLatLonId()

CLatLonCountryId * CSubSource::x_CalculateLatLonId ( float  lat_value,
float  lon_value,
string  country,
string  province 
)
staticprivate

◆ x_FormatWithPrecision()

string CSubSource::x_FormatWithPrecision ( double  val,
int  precision 
)
staticprivate

Definition at line 2682 of file SubSource.cpp.

References precision, and val.

Referenced by FixAltitude().

◆ x_GenericRepliconNameValid()

bool CSubSource::x_GenericRepliconNameValid ( const string value)
staticprivate

◆ x_GetDateTokens()

vector< string > CSubSource::x_GetDateTokens ( const string orig_date)
staticprivate

◆ x_GetPrecision()

int CSubSource::x_GetPrecision ( const string num_str)
staticprivate

Definition at line 2671 of file SubSource.cpp.

References NStr::Find(), int, NPOS, and precision.

Referenced by FixAltitude(), FixLatLonPrecision(), and IsCorrectLatLonFormat().

◆ x_IsFixableIsoDate()

bool CSubSource::x_IsFixableIsoDate ( const string orig_date)
staticprivate

◆ x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules()

bool CSubSource::x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules ( const string value,
const string taxname 
)
staticprivate

◆ x_ParseDateRangeWithDelimiter()

string CSubSource::x_ParseDateRangeWithDelimiter ( const string orig_date,
CTempString  delim 
)
staticprivate

◆ x_RemoveIsoTime()

string CSubSource::x_RemoveIsoTime ( const string orig_date)
staticprivate

Definition at line 804 of file SubSource.cpp.

References NStr::Find(), NPOS, and NStr::TruncateSpacesInPlace().

Referenced by FixDateFormat().

Member Data Documentation

◆ m_LatLonCountryMap

unique_ptr< CLatLonCountryMap > CSubSource::m_LatLonCountryMap
staticprivate

Definition at line 247 of file SubSource.hpp.

Referenced by ValidateLatLonCountry(), and x_CalculateLatLonId().

◆ m_LatLonWaterMap

unique_ptr< CLatLonCountryMap > CSubSource::m_LatLonWaterMap
staticprivate

Definition at line 248 of file SubSource.hpp.

Referenced by ValidateLatLonCountry(), and x_CalculateLatLonId().


The documentation for this class was generated from the following files:
Modified on Wed Jun 19 16:59:28 2024 by modify_doxy.py rev. 669887