A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cleanup__user__object_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/cleanup/cleanup_user_object.cpp Source File

52  bool

any_change =

false

;

55  if

( user_object.IsSetType() && user_object.GetType().IsStr() ) {

60  if

(user_object.IsSetData()) {

61  for

(

auto

field : user_object.SetData()) {

62

any_change |= x_CleanupUserField(*field);

66

any_change |= s_CleanupGeneOntology(user_object);

67

any_change |= s_CleanupStructuredComment(user_object);

68

any_change |= s_CleanupDBLink(user_object);

76  bool

any_change =

false

;

93  for

(

auto

sub_obj : field.

SetData

().SetObjects()) {

106  for

(

auto

sub_field : field.

SetData

().SetFields()) {

120

{

"go ref"

,

"GO_REF:"

}

127  bool

any_change =

false

;

139  static const char

*

const

sc_bsecGoQualType[] = {

140  ""

,

"Component"

,

"Function"

,

"Process" 145  for

(

auto

outer_field : obj.

SetData

()) {

146  if

(outer_field->IsSetLabel() && outer_field->GetLabel().IsStr() &&

147

outer_field->IsSetData() && outer_field->GetData().IsFields()

148

&& sc_GoQualArray.find(outer_field->GetLabel().GetStr().c_str()) != sc_GoQualArray.end()) {

149  for

(

auto

term : outer_field->SetData().SetFields()) {

152  for

(

auto

inner_term_iter : field.

SetData

().SetFields()) {

159  auto

find_term = sc_OntologyTermCleanupMap.find(inner_label.c_str());

160  if

(find_term != sc_OntologyTermCleanupMap.end() &&

162

inner_field.

SetData

().SetStr().erase(0, strlen(find_term->second));

179  bool

any_change =

false

;

191  bool

genome_assembly_data =

false

;

192  bool

ibol_data =

false

;

194  bool

prefix_present =

false

;

195  bool

suffix_present =

false

;

198  const string

kBarcode =

"International Barcode of Life (iBOL)Data"

;

201  for

(

auto

field_i : obj.

SetData

()) {

207

prefix_present =

true

;

211

suffix_present =

true

;

213  if

(is_prefix || is_suffix) {

218

field.

SetData

().SetStr(new_val);

222

genome_assembly_data =

true

;

223

}

else if

( core == kBarcode ) {

229  if

(prefix_present && !suffix_present) {

233

suffix->

SetLabel

().SetStr(

"StructuredCommentSuffix"

);

235  data

.push_back(suffix);

238  if

(!prefix_present && suffix_present) {

242

prefix->

SetLabel

().SetStr(

"StructuredCommentPrefix"

);

244  data

.emplace(

data

.begin(), prefix);

248  if

( genome_assembly_data ) {

268

{

"Annotation Directed"

,

"Annotation-Directed Improvement"

},

269

{

"High Quality Draft"

,

"High-Quality Draft"

},

270

{

"Improved High Quality Draft"

,

"Improved High-Quality Draft"

},

271

{

"Non-contiguous Finished"

,

"Noncontiguous Finished"

}

278  bool

any_change =

false

;

279  for

(

auto

field_i : obj.

SetData

()) {

287  auto

replace = sc_FinishingCleanupMap.find(field.

GetData

().

GetStr

().c_str());

288  if

(replace != sc_FinishingCleanupMap.end()) {

289

field.

SetData

().SetStr(replace->second);

293  string

&field_str = field.

SetData

().SetStr();

294  bool

ambiguous =

false

;

304

coll_date->

GetDate

(&day,

"%2D"

);

307

coll_date->

GetDate

(&month,

"%N"

);

308

month = month.substr(0, 3);

311

coll_date->

GetDate

(&year,

"%Y"

);

313

new_date += day +

"-"

;

316

new_date += month +

"-"

;

322

field_str = new_date;

335  bool

any_change =

false

;

343

CUser_object::TData::iterator it = obj.

SetData

().begin();

344  while

(it != obj.

SetData

().end()) {

345  bool

is_blank =

false

;

346  if

((*it)->IsSetData()) {

347  if

((*it)->GetData().IsStr()) {

348  const string

&

val

= (*it)->GetData().GetStr();

360

it = obj.

SetData

().erase(it);

372  bool

changed =

false

;

379  for

(

auto

& it : obj.

SetData

()) {

380  if

(it->IsSetData() && it->GetData().IsStr()) {

381  string val

= it->GetData().GetStr();

382

it->SetData().SetStrs().push_back(

val

);

395  bool

any_change =

false

;

static bool s_CleanupDBLink(CUser_object &obj)

static bool s_CleanupGeneOntology(CUser_object &obj)

static bool s_CleanupStructuredComment(CUser_object &obj)

static bool s_CleanupGenomeAssembly(CUser_object &obj)

static bool CleanupUserObject(CUser_object &object)

static bool x_CleanupUserField(CUser_field &field)

static bool s_AddNumToUserField(CUser_field &field)

static bool s_RemoveEmptyFields(CUser_object &obj)

void GetDate(string *label, bool year_only=false) const

Append a standardized string representation of the date to the label.

class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...

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.

static CRef< CDate > DateFromCollectionDate(const string &str) THROWS((CException))

CUser_field & SetString(const char *value)

@ eObjectType_StructuredComment

EObjectType GetObjectType() const

SStaticPair< const char *, const char * > TFinishingCleanupElem

DEFINE_STATIC_ARRAY_MAP(TOntologyCleanupMap, sc_OntologyTermCleanupMap, k_ontology_term_cleanup_map)

SStaticPair< const char *, const char * > TOntologyCleanupElem

CStaticArrayMap< const char *, const char *, PNocase_CStr > TFinishingCleanupMap

static const TOntologyCleanupElem k_ontology_term_cleanup_map[]

CStaticArrayMap< const char *, const char *, PNocase_CStr > TOntologyCleanupMap

static const TFinishingCleanupElem k_finishing_cleanup_map[]

bool CleanVisString(string &str)

bool Asn2gnbkCompressSpaces(string &val)

weird space compression from C Toolkit

Include a standard set of the NCBI C++ Toolkit most basic headers.

static const char * str(char *buf, int n)

#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 CStringUTF8 AsUTF8(const CTempString &src, EEncoding encoding, EValidate validate=eNoValidate)

Convert into UTF8 from a C/C++ 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 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.

static string & ToUpper(string &str)

Convert string to upper case – string& version.

@ eNocase

Case insensitive compare.

const TStr & GetStr(void) const

Get the variant data.

bool IsSetData(void) const

the object itself Check if a value has been assigned to Data data member.

bool IsStr(void) const

Check if variant Str is selected.

bool IsSetType(void) const

type of object within class Check if a value has been assigned to Type data member.

bool IsSetYear(void) const

full year (including 1900) Check if a value has been assigned to Year data member.

bool IsStd(void) const

Check if variant Std is selected.

const TStrs & GetStrs(void) const

Get the variant data.

const TData & GetData(void) const

Get the Data member data.

const TOss & GetOss(void) const

Get the variant data.

bool IsFields(void) const

Check if variant Fields is selected.

bool IsSetDay(void) const

day of month (1-31) Check if a value has been assigned to Day data member.

bool IsStr(void) const

Check if variant Str is selected.

bool IsSetLabel(void) const

field label Check if a value has been assigned to Label data member.

TData & SetData(void)

Assign a value to Data data member.

void SetNum(TNum value)

Assign a value to Num data member.

const TStr & GetStr(void) const

Get the variant data.

bool IsSetNum(void) const

required for strs, ints, reals, oss Check if a value has been assigned to Num data member.

void SetLabel(TLabel &value)

Assign a value to Label data member.

const TReals & GetReals(void) const

Get the variant data.

bool IsSetMonth(void) const

month (1-12) Check if a value has been assigned to Month data member.

void SetData(TData &value)

Assign a value to Data data member.

const TLabel & GetLabel(void) const

Get the Label member data.

const TType & GetType(void) const

Get the Type member data.

bool IsSetData(void) const

Check if a value has been assigned to Data data member.

const TStd & GetStd(void) const

Get the variant data.

E_Choice Which(void) const

Which variant is currently selected.

const TInts & GetInts(void) const

Get the variant data.

TNum GetNum(void) const

Get the Num member data.

@ e_Object

for using other definitions

@ e_not_set

No variant selected.

const string kGenomeAssemblyData

Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4