148 string db_name = field_name.substr(tag_name.length());
163 string field = field_name.substr(
string(
"Structured comment").length() + 1,
NPOS);
164 string label = field.substr(
string(
"Field").length() + 1,
NPOS);
177 vector< CConstRef<CObject> > rval;
189 vector<CConstRef<CObject> > objs;
192 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
195 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
196 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
197 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
201 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
216 vector<CRef<CApplyObject> >
objects;
237 vector<CConstRef<CObject> > related;
250 related.push_back(obj);
263 vector<CConstRef<CObject> > related;
265 const CSeqdesc * obj_desc =
dynamic_cast<const CSeqdesc *
>(&(
object.GetObject()));
268 const CBioseq * bioseq =
dynamic_cast<const CBioseq *
>(&(
object.GetObject()));
276 related.push_back(obj);
282 else if (bioseq || inst) {
306 vals.push_back(
GetVal(
object));
339 string curr_val =
"";
356 if (obj_desc && obj_desc->
IsTitle()) {
368 vals.push_back(
GetVal(
object));
401 string curr_val =
"";
417 vector<string> vals =
GetVals(
object);
418 return (vals.empty()) ?
kEmptyStr : vals[0];
487 string curr_val = *it;
523 vector<CConstRef<CObject> >
objects;
529 object.Reset(&(*desc_ci));
541 vector<CConstRef<CObject> > objs;
544 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
547 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
548 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
549 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
553 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
569 vector<CRef<CApplyObject> > apply_objs;
570 vector<CConstRef<CObject> > objs =
GetObjects(bsh);
573 const CSeqdesc* orig_desc =
dynamic_cast<const CSeqdesc*
>((*it).GetPointer());
575 apply_objs.push_back(new_obj);
577 if (apply_objs.empty()) {
579 apply_objs.push_back(new_obj);
593 if (seqdesc && seqdesc->
IsUser()) {
597 CUser_object::TData::const_iterator it = user->
GetData().begin();
598 while (it != user->
GetData().end()) {
600 && (*it)->IsSetData() && (*it)->GetData().IsInt()) {
614 vals.push_back(
GetVal(
object));
624 if (seqdesc && seqdesc->
IsUser()) {
642 if (seqdesc && seqdesc->
IsUser()) {
646 CUser_object::TData::iterator it = user->
SetData().begin();
647 while (it != user->
SetData().end()) {
649 it = user->
SetData().erase(it);
682 if (seqdesc && seqdesc->
IsUser()) {
688 CUser_object::TData::iterator it = user->
SetData().begin();
689 while (it != user->
SetData().end()) {
691 string curr_val =
"";
692 bool can_change =
false;
693 if ((*it)->IsSetData()) {
694 if ((*it)->GetData().IsStr()) {
695 curr_val = (*it)->GetData().GetStr();
698 else if ((*it)->GetData().IsInt()) {
706 (*it)->SetData().SetInt(numval);
709 catch (
const exception&) {
722 new_field->
SetData().SetInt(numval);
723 user->
SetData().push_back(new_field);
726 catch (
const exception&) {
737 string rval =
"Genome Project ID should be a number";
742 catch (
const exception&) {
751 ITERATE(vector<string>, it, values) {
760 vector<CConstRef<CObject> > related;
774 related.push_back(obj);
792 vector<CConstRef<CObject> > related;
794 const CSeqdesc * obj_desc =
dynamic_cast<const CSeqdesc *
>(&(
object.GetObject()));
805 related.push_back(obj);
832 vector<CConstRef<CObject> >
objects;
840 vector<CConstRef<CObject> >
objects;
841 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
846 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
861 vector<CRef<CApplyObject> >
objects;
868 vector<CConstRef<CObject> >
objects;
874 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
879 }
else if (obj_feat) {
892 vector<CConstRef<CObject> >
objects;
893 CBioseq_CI bi(
object.GetSEH(), objects::CSeq_inst::eMol_na);
904 vector<string> vals =
GetVals(
object);
905 return (vals.empty()) ?
kEmptyStr : vals[0];
951 vals.push_back(desc_it->GetComment());
956 copy(bankit.begin(), bankit.end(), back_inserter(vals));
964 vector<CConstRef<CObject> >
objects;
972 const string& constraint_field,
975 vector<CConstRef<CObject> >
objects;
976 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
981 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
986 constraint_field, string_constraint,
999 vector<CRef<CApplyObject> >
objects;
1007 vector<CConstRef<CObject> >
objects;
1013 CBioseq_CI bi(seh, objects::CSeq_inst::eMol_na);
1019 else if (obj_feat) {
1034 vector<CConstRef<CObject> >
objects;
1035 CBioseq_CI bi(
object.GetSEH(), objects::CSeq_inst::eMol_na);
1049 if (bioseq && bioseq->
IsSetId()) {
1061 vector<string> vals;
1062 vals.push_back(
GetVal(
object));
1073 if (bioseq && bioseq->
IsSetId()) {
1122 for (; iter != sm_GenIdMap.end(); ++iter){
1123 if (iter->second == stype_part){
1133 if (iter != sm_GenIdMap.end()){
1134 return iter->second;
1143 if (bioseq && bioseq->
IsSetId()) {
1145 const CSeq_id& seqid = **seqid_ci;
1180 val.erase(
val.end() - 1);
1190 vector< CConstRef<CObject> >
objects;
1210 vector< CConstRef<CObject> >
objects;
1216 vector<CRef<CApplyObject> >
objects;
1234 vector< CConstRef<CObject> >
objects;
1240 vector< CConstRef<CObject> >
objects;
1246 vector<string> vals =
GetVals(
object);
1247 return (vals.empty()) ?
kEmptyStr : vals[0];
1252 vector<string> vals;
1254 if (seqdesc && seqdesc->
IsUser()) {
1257 if (!user.
GetData().empty()) {
1272 if (!vals.empty()) {
1277 if (bioseq && bioseq->
IsSetId()) {
1282 vals.push_back(
val);
1292 if (seqdesc && seqdesc->
IsUser()) {
1315 if (bioseq && bioseq->
IsSetId()) {
1332 vector< CConstRef<CObject> > rval;
1337 rval.push_back(obj);
1347 vector<CConstRef<CObject> > objs;
1350 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
1353 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
1354 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
1355 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
1358 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
1361 objs.push_back(*it);
1377 vector<CRef<CApplyObject> >
objects;
1401 vector<CConstRef<CObject> > related;
1412 related.push_back(obj);
1421 vector<CConstRef<CObject> > related;
1430 related.push_back(obj);
1453 vector<string> vals =
GetVals(
object);
1454 return (vals.empty()) ?
kEmptyStr : vals[0];
1459 vector<string> vals;
1463 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() && (*it)->IsSetData()
1465 switch((*it)->GetData().Which()) {
1467 vals.push_back((*it)->GetData().GetStr());
1488 CUser_object::TData::iterator it = user->
SetData().begin();
1489 while (it != user->
SetData().end()) {
1490 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() &&
1492 it = user->
SetData().erase(it);
1497 if (user->
GetData().empty()) {
1510 CUser_object::TData::iterator it = user->
SetData().begin();
1511 while (it != user->
SetData().end()) {
1512 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1514 rval |=
SetVal(**it, newValue, existing_text);
1517 if (!(*it)->IsSetData()) {
1518 it = user->
SetData().erase(it);
1534 if (user->
GetData().empty()) {
1549 field.
SetData().SetStr(curr_val);
1553 field.
SetData().SetStr(newValue);
1557 field.
SetData().SetStr(newValue);
1571 user.
SetData().push_back(field);
1579 if (field_names.empty()) {
1581 user.
SetData().push_back(field);
1585 vector<string>::iterator sit = field_names.begin();
1586 CUser_object::TData::iterator fit = user.
SetData().begin();
1587 while (sit != field_names.end() && fit != user.
SetData().end()) {
1588 string field_label = (*fit)->GetLabel().GetStr();
1597 user.
SetData().insert(fit, field);
1600 user.
SetData().insert(fit, field);
1607 user.
SetData().push_back(field);
1615 if (seqdesc && seqdesc->
IsUser()) {
1626 if (seqdesc && seqdesc->
IsUser()) {
1637 vector<string> vals;
1647 CUser_object::TData::iterator it = user->
SetData().begin();
1648 while (it != user->
SetData().end()) {
1649 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1652 it = user->
SetData().erase(it);
1657 if (user->
GetData().empty()) {
1670 CUser_object::TData::iterator it = user->
SetData().begin();
1671 while (it != user->
SetData().end()) {
1672 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1675 rval |=
SetVal(**it, newValue, existing_text);
1678 if (!(*it)->IsSetData()) {
1679 it = user->
SetData().erase(it);
1701 if (user->
GetData().empty()) {
1715 string root = curr_val;
1758 vector<string> vals;
1763 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1766 vals.push_back((*it)->GetLabel().GetStr());
1780 CUser_object::TData::iterator it = user->
SetData().begin();
1781 while (it != user->
SetData().end()) {
1782 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1785 it = user->
SetData().erase(it);
1791 if (user->
GetData().empty()) {
1805 CUser_object::TData::iterator it = user->
SetData().begin();
1806 while (it != user->
SetData().end()) {
1807 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1810 rval |=
SetVal(**it, newValue, existing_text);
1818 new_field->SetLabel().SetStr(newValue);
1834 CUser_object::TData::iterator it = user->
SetData().begin();
1835 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
1846 if (user->
GetData().empty()) {
1875 vector< CConstRef<CObject> >
objects;
1883 vector< CConstRef<CObject> >
objects;
1890 vector<CRef<CApplyObject> >
objects;
1897 vector< CConstRef<CObject> >
objects;
1903 vector< CConstRef<CObject> >
objects;
1954 if (pos == string::npos) {
1957 string key = name.substr(0, pos);
2010 vector<CConstRef<CObject> >
objects;
2024 vector<CConstRef<CObject> > objs;
2027 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2030 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
2031 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
2032 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
2035 vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
2038 objs.push_back (*it);
2051 vector<CRef<CApplyObject> > objs;
2058 vector<CConstRef<CObject> > feats =
GetObjects(bsh);
2066 vector<CRef<CApplyObject> > objs;
2069 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2072 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
2074 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
2080 objs.push_back (*it);
2087 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2090 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
2091 vector<CRef<CApplyObject> > these_objs =
m_FieldHandler->GetApplyObjects(*bi);
2092 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
2095 vector<CRef<CApplyObject> > these_objs =
m_FieldHandler->GetApplyObjects(*bi);
2098 objs.push_back (*it);
2105 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2108 if (edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi, string_constraint)) {
2110 objs.insert(objs.end(), these_objs.begin(), these_objs.end());
2116 objs.push_back (*it);
2131 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2140 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2142 vector<CRef<CApplyObject> > these_objs =
m_FieldHandler->GetApplyObjects(*bi);
2150 CBioseq_CI bi (seh, objects::CSeq_inst::eMol_na);
2178 vector<string> add = col->
GetVals(**it);
2179 values.
insert(add.begin(), add.end());
2203 vector<string> vals;
2248 bool any_change =
false;
2250 string orig_val =
GetVal(*
object);
2252 const CSeqdesc* old_desc =
dynamic_cast<const CSeqdesc *
>(
object.GetPointer());
2256 new_desc->
Assign(*old_desc);
2262 cmd->AddCommand(*ecmd);
2267 cmd->AddCommand(*ecmd);
2271 }
else if (old_feat) {
2273 new_feat->
Assign(*old_feat);
2285 if (update_mrna_product) {
2286 string prot_product =
GetVal(*new_feat);
2288 if (also_change_mrna) {
2289 cmd->AddCommand(*also_change_mrna);
2328 bool update_mrna_product)
2335 if (
SetVal(*new_obj,
val, existing_text)) {
2337 if (update_mrna_product) {
2338 string prot_product =
GetVal(*new_obj);
2340 if (also_change_mrna) {
2341 cmd->AddCommand(*also_change_mrna);
2353 const CSeqdesc * old_desc =
dynamic_cast<const CSeqdesc *
>(
object.GetPointer());
2360 new_desc->
Assign(*old_desc);
2361 new_obj = (
CObject *)new_desc;
2362 }
else if (old_feat) {
2365 new_feat->
Assign(*old_feat);
2366 new_obj = (
CObject *)new_feat;
2375 bool success =
false;
2383 if (seh && new_desc) {
2385 cmd->AddCommand(*ecmd);
2388 }
else if (old_feat) {
2405 if (src_prot_name) {
2406 prot_product =
GetVal(
object.SetObject());
2407 }
else if (dest_prot_name) {
2408 prot_product = other.
GetVal(
object.SetObject());
2414 return also_change_mrna;
2429 if (src_prot_name) {
2431 if (dest_mRNA_notproduct) {
2442 }
else if (dest_prot_name) {
2444 if (src_notmRNA_product) {
2457 return also_change_mrna;
2463 const string& field_name,
const bool update_mrna_product)
2466 string val =
GetVal(
object.SetObject());
2472 string orig_val = other.
GetVal(
object.SetObject());
2474 if (other.
SetVal(
object.SetObject(),
val, existing_text)) {
2475 if (update_mrna_product) {
2478 if ( ! leave_original ) {
2482 if (also_change_mrna) {
2483 cmd->AddCommand(*also_change_mrna);
2496 const bool leave_original,
2497 const string& field_name,
2498 const bool update_mrna_product)
2501 if (!src_object || !dst_object) {
2505 if (src_object == dst_object || src_object->GetOriginalObject() == dst_object->GetOriginalObject()) {
2506 return ConvertValCmd(*src_object, other, existing_text, cap_change, leave_original, field_name, update_mrna_product);
2509 string val =
GetVal(src_object->SetObject());
2515 string orig_val = other.
GetVal(dst_object->SetObject());
2518 if (other.
SetVal(dst_object->SetObject(),
val, existing_text)) {
2520 bool changed_src =
false;
2522 if (update_mrna_product) {
2523 also_change_mrna =
x_GetMrnaUpdate(*src_object, *dst_object, other, changed_src);
2525 if ( ! leave_original) {
2532 cmd->AddCommand(*change_src);
2536 cmd->AddCommand(*change_dst);
2537 if (also_change_mrna) {
2538 cmd->AddCommand(*also_change_mrna);
2551 string val =
GetVal(
object.SetObject());
2553 if (other.
SetVal(
object.SetObject(),
val, existing_text)) {
2554 if (update_mrna_product) {
2559 if (also_change_mrna) {
2560 cmd->AddCommand(*also_change_mrna);
2573 bool update_mrna_product)
2576 if (!src_object || !dst_object) {
2580 if (src_object == dst_object || src_object->GetOriginalObject() == dst_object->GetOriginalObject()) {
2581 return CopyValCmd(*src_object, other, existing_text, update_mrna_product);
2583 string val =
GetVal(src_object->SetObject());
2584 string orig_val = other.
GetVal(dst_object->SetObject());
2587 if (other.
SetVal(dst_object->SetObject(),
val, existing_text)) {
2589 bool changed_src =
false;
2591 if (update_mrna_product) {
2592 also_change_mrna =
x_GetMrnaUpdate(*src_object, *dst_object, other, changed_src);
2597 cmd->AddCommand(*change_src);
2601 cmd->AddCommand(*change_dst);
2602 if (also_change_mrna) {
2603 cmd->AddCommand(*also_change_mrna);
2616 string val1 =
GetVal(
object.SetObject());
2617 string val2 = other.
GetVal(
object.SetObject());
2627 other.
ClearVal(
object.SetObject());
2629 other.
ClearVal(
object.SetObject());
2635 other.
ClearVal(
object.SetObject());
2639 if (update_mrna_product) {
2645 if (also_change_mrna) {
2646 cmd->AddCommand(*also_change_mrna);
2658 bool update_mrna_product)
2661 if (!src_object || !dst_object) {
2665 if (src_object == dst_object || src_object->GetOriginalObject() == dst_object->GetOriginalObject()) {
2666 return SwapValCmd(*src_object, other, existing_text, update_mrna_product);
2668 string val1 =
GetVal(src_object->SetObject());
2669 string val2 = other.
GetVal(dst_object->SetObject());
2678 other.
ClearVal(dst_object->SetObject());
2680 other.
ClearVal(dst_object->SetObject());
2686 other.
ClearVal(dst_object->SetObject());
2691 if (change && update_mrna_product) {
2692 bool changed_src =
false;
2693 also_change_mrna =
x_GetMrnaUpdate(*src_object, *dst_object, other, changed_src);
2699 cmd->AddCommand(*change_src);
2702 cmd->AddCommand(*change_dst);
2703 if (also_change_mrna) {
2704 cmd->AddCommand(*also_change_mrna);
2714 bool update_mrna_product)
2718 string val1 =
GetVal(
object.SetObject());
2724 other.
SetVal(
object.SetObject(), val2, existing_text);
2735 if (update_mrna_product) {
2740 if (also_change_mrna) {
2741 cmd->AddCommand(*also_change_mrna);
2754 bool update_mrna_product)
2757 if (!src_object || !dst_object) {
2761 if (src_object == dst_object || src_object->GetOriginalObject() == dst_object->GetOriginalObject()) {
2762 return ParseValCmd(*src_object, other, parse_options, existing_text, update_mrna_product);
2764 string val1 =
GetVal(src_object->SetObject());
2771 other.
SetVal(dst_object->SetObject(), val2, existing_text);
2773 bool changed_src =
false;
2786 if (update_mrna_product) {
2787 also_change_mrna =
x_GetMrnaUpdate(*src_object, *dst_object, other, changed_src);
2792 cmd->AddCommand(*change_src);
2796 cmd->AddCommand(*change_dst);
2797 if (also_change_mrna) {
2798 cmd->AddCommand(*also_change_mrna);
2809 vector<string> values;
2810 values.push_back(
val);
2812 if (problems.size() > 0) {
2813 error = problems[0];
2818 vector<string> values;
2819 values.push_back(
val);
2821 if (problems.size() > 0) {
2822 error = problems[0];
2831 vector<string> problems;
2846 vector<string> curr_vals =
GetVals(obj);
2847 ITERATE(vector<string>, it, curr_vals) {
2920 vector<CRef<CSeqTable_column> > column_list;
2922 ITERATE (vector<string>, sit, fields) {
2924 field_list.push_back(col);
2932 if ((*it)->IsFeature()) {
2935 vector<CConstRef< CObject> >
objects = (*it)->GetObjects(bsh);
2949 size_t max_rows = 0;
2950 for (
size_t i = 0;
i < rows.size();
i++)
2951 if (rows[
i] > max_rows)
2966 table->SetColumns().push_back(id_col);
2969 vector<CRef<CSeqTable_column> > column_list;
2971 ITERATE (vector<string>, sit, fields) {
2973 field_list.push_back(col);
2977 CBioseq_CI bi(entry, objects::CSeq_inst::eMol_na);
2978 vector<size_t> rows(field_list.size(),0);
2983 vector<CConstRef< CObject> >
objects = (*it)->GetObjects(*bi);
2984 for (
size_t i = 0;
i <
objects.size();
i++) {
2992 for (
size_t i = row1;
i < row2;
i++)
2997 table->SetColumns()[0]->SetData().SetId().push_back(
id);
2999 for (
size_t i = 0;
i < field_list.size();
i++)
3014 if ((*t)->GetOriginalObject() == (*p)->GetOriginalObject()) {
3015 (*t)->ReplaceEditable((*p)->SetObject());
3078 ur =
"add_new_qual";
3086 rval =
"&update_rule=" + ur +
"&text_separator=" + sep;
3095 value +=
"&blanks=";
3116 vector<CConstRef<CSeq_feat> > feat_list;
3121 object.Reset(
f->GetOriginalSeq_feat());
3122 feat_list.push_back(
object);
3132 vector<CConstRef<CSeq_feat> > feat_list;
3139 if (obj_is_prot && constraint_is_prot) {
3143 }
else if (obj_is_prot && !constraint_is_prot) {
3154 }
else if (!obj_is_prot && constraint_is_prot) {
3175 vector<CConstRef<CSeq_feat> > this_list =
GetRelatedFeatures(*(it->second), constraint_type, scope);
3176 feat_list.insert(feat_list.end(), this_list.begin(), this_list.end());
3184 feat_list.push_back(
f);
3194 feat_list.push_back(it->second);
3200 feat_list.push_back(
f);
3204 feat_list.push_back(
f);
3213 vector<CRef<CApplyObject> > feat_list;
3218 feat_list.push_back(p);
3222 if (feat_list.empty() &&
3227 id->Assign(*(p_bsh.
GetId().front().GetSeqId()));
3231 new_feat->
SetData().SetProt();
3245 vector<CRef<CApplyObject> > feat_list;
3252 if (obj_is_prot && constraint_is_prot) {
3256 }
else if (obj_is_prot && !constraint_is_prot) {
3264 feat_list.push_back(p);
3269 }
else if (!obj_is_prot && constraint_is_prot) {
3289 feat_list.insert(feat_list.end(), this_list.begin(), this_list.end());
3299 feat_list.push_back(p);
3305 new_feat->
SetData().SetGene();
3319 feat_list.push_back(p);
3328 feat_list.push_back(p);
3333 feat_list.push_back(p);
3344 vector<CConstRef<CObject> > related;
3359 related.push_back(obj);
3363 if (seh && obj_desc->
IsTitle()) {
3373 }
else if (obj_feat) {
3376 related.push_back(obj);
3391 if (obj_type == constraint_type) {
3393 related.push_back(obj);
3395 vector<CConstRef<CSeq_feat> > feat_list =
GetRelatedFeatures(*obj_feat, constraint_type, scope);
3396 related.insert(related.end(), feat_list.begin(), feat_list.end());
3398 }
else if (obj_desc) {
3401 if (seh && obj_desc->
IsTitle()) {
3411 related.push_back(obj);
3425 vector<CConstRef<CObject> > related;
3427 const CSeqdesc * obj_desc =
dynamic_cast<const CSeqdesc *
>(&(
object.GetObject()));
3429 const CBioseq * bioseq =
dynamic_cast<const CBioseq *
>(&(
object.GetObject()));
3432 if (bioseq || inst) {
3433 related =
GetObjects(
object.GetSEH().GetSeq());
3438 related.push_back(obj);
3442 if (seh && obj_desc->
IsTitle()) {
3452 }
else if (obj_feat) {
3455 related.push_back(obj);
3469 if (obj_type == constraint_type ||
3472 related.push_back(obj);
3475 vector<CConstRef<CSeq_feat> > feat_list =
GetRelatedFeatures(*obj_feat, constraint_type, scope);
3476 related.insert(related.end(), feat_list.begin(), feat_list.end());
3478 }
else if (obj_desc) {
3481 if (seh && obj_desc->
IsTitle()) {
3491 related.push_back(obj);
3518 vector<CRef<CApplyObject> > related;
3520 const CSeqdesc * obj_desc =
dynamic_cast<const CSeqdesc *
>(&(
object.GetObject()));
3522 const CBioseq * bioseq =
dynamic_cast<const CBioseq *
>(&(
object.GetObject()));
3525 if (bioseq || inst) {
3532 related.push_back(obj);
3541 }
else if (obj_feat) {
3544 related.push_back(obj);
3560 if (obj_type == constraint_type) {
3562 related.push_back(obj);
3566 related.insert(related.end(), feat_list.begin(), feat_list.end());
3568 }
else if (obj_desc) {
3580 related.push_back(obj);
3602 vector<string> val_list;
3605 vector<string> add = col->
GetVals(**it);
3606 val_list.insert(val_list.end(), add.begin(), add.end());
3623 vector<string> val_list;
3627 vector<string> add = col->
GetVals(**it);
3628 val_list.insert(val_list.end(), add.begin(), add.end());
3636 if (entry.
IsSeq()) {
3655 }
else if (entry.
IsSet()) {
3717 cmd->AddCommand(*ecmd);
3734 cmd->AddCommand (*ecmd);
3749 if (!view_srv)
return;
3766 if (projectTree &&
objects.empty()) {
3779 const CObject* ptr = it->object.GetPointer();
3782 if (seqloc || bioseq) {
3794 for (; b_iter; ++b_iter, ++NAseqs);
3796 if (NAseqs == 1 &&
objects.size() == 2) {
3802 return (viewed_bseqs == NAseqs);
3809 for (; b_iter; ++b_iter, ++NAseqs);
3811 if (NAseqs == 1 &&
objects.size() == 2) {
3817 return (viewed_bseqs > NAseqs);
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)
bool AdjustProteinFeaturePartialsToMatchCDS(CSeq_feat &new_prot, const CSeq_feat &cds)
AdjustProteinFeaturePartialsToMatchCDS A function to change an existing MolInfo to match a coding reg...
CSeq_entry_Handle GetSEH() const
const CObject * GetOriginalObject() const
const CSeq_id * GetLocalId() const
Find a local ID if present.
static EDBLinkFieldType GetTypeForLabel(string label)
@ eDBLinkFieldType_Unknown
void GetLabel(string *label) const
virtual string GetVal(const CObject &object)
virtual vector< string > GetVals(const CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool IsEmpty(const CObject &object) const
virtual void ClearVal(CObject &object)
static CRef< CFeatureSeqTableColumnBase > Create(const string &sTitle, objects::CSeqFeatData::ESubtype subtype=objects::CSeqFeatData::eSubtype_any)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual bool AllowMultipleValues()
virtual void ClearInFeature(objects::CSeq_feat &in_out_feat)
void SetMajorType(objects::CSeqFeatData::E_Choice major_type)
virtual string GetFromFeat(const objects::CSeq_feat &in_out_feat)
objects::CSeqFeatData::E_Choice GetMajorType()
void SetScope(CRef< CScope > scope)
virtual vector< string > IsValid(const vector< string > &values)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual bool AddToFeature(objects::CSeq_feat &in_out_feat, const string &newValue, objects::edit::EExistingText existing_text)
virtual string GetLabel() const
objects::CSeqFeatData::ESubtype GetSubtype()
static CRef< ncbi::CFieldHandler > Create(const string &field_name)
virtual string GetVal(const CObject &object)
virtual bool IsEmpty(const CObject &object) const
bool x_IsNCBIFILEId(const objects::CSeq_id &seq_id)
void SetFormatGenbank(void)
void SkipGenbankBlock(FGenbankBlocks fTGenbankBlocksMask)
void SetStyleNormal(void)
@ fGenbankBlocks_FeatAndGap
@ fGenbankBlocks_Sequence
@ fGenbankBlocks_Featheader
@ fGenbankBlocks_Basecount
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual string GetVal(const CObject &object)
void Generate(const CSeq_entry_Handle &entry, CFlatItemOStream &item_os, const multiout &={})
virtual bool IsEmpty(const CObject &object) const
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual string GetVal(const CObject &object)
virtual void ClearVal(CObject &object)
CRef< objects::edit::CStringConstraint > m_StringConstraint
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< string > GetVals(const CObject &object)
static EGeneralIDPart GetGeneralIDPart_FromName(const string &name)
virtual string GetVal(const CObject &object)
EGeneralIDPart m_GeneralIDPart
static const string & GetName_GeneralIDPart(EGeneralIDPart stype_part)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
static bool IsGenomeProject(const objects::CUser_object &user)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
static bool IsGenomeProjectID(const objects::CUser_field &field)
virtual bool IsEmpty(const CObject &object) const
virtual string GetVal(const CObject &object)
virtual string IsValid(const string &val)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual void ClearVal(CObject &object)
virtual vector< string > GetVals(const CObject &object)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual string GetVal(const CObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual bool IsEmpty(const CObject &object) const
virtual vector< string > GetVals(const CObject &object)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
CRef< CCmdComposite > SetValCmd(CConstRef< CObject > object, const string &val, objects::edit::EExistingText existing_text, objects::CScope &scope, bool update_mrna_product=false)
bool AllowMultipleValues()
CRef< ncbi::CFieldHandler > m_FieldHandler
CRef< CSrcTableColumnBase > m_Src
CRef< CObject > GetNewObject(CConstRef< CObject > obj)
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
bool IsProductField(void)
void AddApplyObjectValue(const objects::edit::CApplyObject &object, const string &field, set< string > &values)
void ClearVal(CObject &object)
vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
static bool s_IsSequenceIDField(const string &field)
CRef< CCmdComposite > SwapValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
int CountConflicts(set< CConstRef< CObject > > objs, const string &val)
bool IsEmpty(const CObject &object) const
objects::CSeqdesc::E_Choice GetDescriptorSubtype()
CRef< CCmdComposite > ConvertValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, objects::ECapChange cap_change, const bool leave_original, const string &field_name, const bool update_mrna_product)
void SetConstraint(string field, CRef< objects::edit::CStringConstraint > string_constraint)
CRef< CCmdComposite > GetReplacementCommand(CConstRef< CObject >, CRef< CObject > newobj, objects::CScope &scope, const string &cmd_name)
CRef< CCmdComposite > CopyValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
vector< string > GetVals(const CObject &object)
objects::CSeqFeatData::ESubtype GetFeatureSubtype()
CRef< CCmdComposite > ParseValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, const objects::edit::CParseTextOptions &parse_options, objects::edit::EExistingText existing_text, bool update_mrna_product)
CMiscSeqTableColumn(const string &name)
vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
CRef< CCmdComposite > x_GetMrnaUpdate(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other)
CRef< CFeatureSeqTableColumnBase > m_Feature
vector< CRef< objects::edit::CApplyObject > > GetRelatedApplyObjects(objects::edit::CApplyObject &object)
string IsValid(const string &val)
string GetVal(const CObject &object)
CRef< CCmdComposite > ClearValCmd(CConstRef< CObject > object, bool update_mrna_product, objects::CScope &scope)
bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
void GetApplyObjectsValues(objects::CSeq_entry_Handle seh, const string &constraint_field, set< string > &values)
void SetScope(CRef< objects::CScope > scope)
static EMolInfoFieldType GetFieldType(const string &field_name)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
ostream & AsString(ostream &s) const
void RemoveSelectedText(string &input, bool remove_first_only=true) const
string GetSelectedText(const string &input) const
bool ShouldRemoveFromParsed() const
CProjectTreeView - a system view that displays Project Tree.
void GetSingleObject(TConstScopedObjects &objects) const
virtual void GetSelection(TConstScopedObjects &objects) const
shall return data objects representing selected things, return one data object for every selected thi...
static EPubFieldType GetTypeForLabel(string label)
ESubtype GetSubtype(void) const
static E_Choice GetTypeFromSubtype(ESubtype subtype)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< string > GetVals(const CObject &object)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual string GetVal(const CObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
namespace ncbi::objects::
static CRef< CSrcTableColumnBase > Create(const objects::CSeqTable_column &column)
virtual void SetConstraint(const string &field_name, CConstRef< edit::CStringConstraint > string_constraint)
virtual vector< string > IsValid(const vector< string > &values)
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(CBioseq_Handle bsh)
string GetVal(const CObject &object)
vector< string > GetVals(const CObject &object)
vector< CConstRef< CObject > > GetObjects(CBioseq_Handle bsh)
void ClearVal(CObject &object)
virtual bool AllowMultipleValues()
virtual bool AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue, objects::edit::EExistingText existing_text)
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
TBase::const_iterator const_iterator
bool DoesListMatch(const vector< string > &vals)
virtual vector< string > GetVals(const CObject &object)
virtual void ClearVal(CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
unsigned int m_NrOfSetting
virtual void ClearVal(CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< string > GetVals(const CObject &object)
objects::CUser_object::TData m_FieldValuePairs
void x_InsertFieldAtCorrectPosition(objects::CUser_object &user, CRef< objects::CUser_field > field)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< string > GetVals(const CObject &object)
virtual void ClearVal(CObject &object)
virtual string GetVal(const CObject &object)
virtual bool IsEmpty(const CObject &object) const
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
const objects::CUser_object * x_GetUser_Object(const CObject &object) const
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
objects::CSeqdesc::E_Choice m_Subtype
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
EObjectType GetObjectType() const
class IProjectView defines the abstract interface for views observing projects.
virtual string GetLabel(ELabelType type) const =0
returns name of the plug-in created this view (view class name)
virtual void GetMainObject(TConstScopedObjects &objects) const =0
Adds the main data objects represented by the client to "objects".
virtual void GetActiveObjects(TConstScopedObjects &objects) const
IViewManagerService IViewManagerService manages views in Workbench.
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
static auto & RemoveFieldNameFromString
static auto & FixCapitalizationInString
int FindHighestFeatureId(const objects::CSeq_entry_Handle &entry)
void SetRnaProductName(objects::CRNA_ref &rna, const string &product, string &remainder, objects::edit::EExistingText existing_text)
const char * kDefinitionLineLabel
const char * kStructCommFieldName
const char * kFieldTypeSeqId
const char * kGenomeProjectID
const char * kStructCommDBName
const char * kStructCommFieldValuePair
const char * kCommentDescriptorLabel
const char * kBankITComment
const char * kGenbankBlockKeyword
const char * kSequenceIdColLabel
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
const string & GetMsg(void) const
Get message string.
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
vector< CIRef< IView > > TViews
virtual void GetViews(TViews &views)=0
get all registered views
vector< SConstScopedObject > TConstScopedObjects
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
@ eContent
Untagged human-readable accession or the like.
CRef< CSeq_loc > Merge(TOpFlags flags, ISynonymMapper *syn_mapper) const
All functions create and return a new seq-loc object.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
CMappedFeat GetBestMrnaForCds(const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
CMappedFeat GetBestCdsForMrna(const CMappedFeat &mrna_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eOverlap_Contains
2nd contains 1st extremes
@ eOverlap_Contained
2nd contained within 1st extremes
const CSeq_feat * GetCDSForProduct(const CBioseq &product, CScope *scope)
Get the encoding CDS feature of a given protein sequence.
CConstRef< CSeq_feat > GetOverlappingGene(const CSeq_loc &loc, CScope &scope, ETransSplicing eTransSplicing=eTransSplicing_Auto)
vector< TFeatScore > TFeatScores
void GetOverlappingFeatures(const CSeq_loc &loc, CSeqFeatData::E_Choice feat_type, CSeqFeatData::ESubtype feat_subtype, EOverlapType overlap_type, TFeatScores &feats, CScope &scope, const TBestFeatOpts opts=0, CGetOverlappingFeaturesPlugin *plugin=NULL)
Find all features overlapping the location.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, EMissing action=eMissing_Default)
const TDescr & GetDescr(void) const
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
TClass GetClass(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const
Return the complete bioseq-set object.
CBioseq_set_Handle GetParentBioseq_set(void) const
Get parent bioseq-set handle.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id) const
Get Bioseq handle from the TSE of this Seq-entry.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
CSeq_entry_Handle GetParentEntry(void) const
Return a handle for the parent seq-entry of the bioseq.
TInst_Length GetInst_Length(void) const
bool IsSetClass(void) const
bool IsSetDescr(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
CScope & GetScope(void) const
Get scope this handle belongs to.
const TId & GetId(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsOssEmpty(CNcbiOstrstream &oss)
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
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.
@ eNocase
Case insensitive compare.
static const char label[]
TKeywords & SetKeywords(void)
Assign a value to Keywords data member.
bool IsSetExtra_accessions(void) const
Check if a value has been assigned to Extra_accessions data member.
void ResetKeywords(void)
Reset Keywords data member.
bool IsSetDiv(void) const
GenBank division Check if a value has been assigned to Div data member.
bool IsSetTaxonomy(void) const
continuation line of organism Check if a value has been assigned to Taxonomy data member.
bool IsSetSource(void) const
source line Check if a value has been assigned to Source data member.
bool IsSetEntry_date(void) const
replaces date Check if a value has been assigned to Entry_date data member.
const TKeywords & GetKeywords(void) const
Get the Keywords member data.
bool IsSetOrigin(void) const
Check if a value has been assigned to Origin data member.
bool IsSetKeywords(void) const
Check if a value has been assigned to Keywords data member.
bool IsSetDate(void) const
OBSOLETE old form Entry Date Check if a value has been assigned to Date data member.
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 IsSetDb(void) const
name of database or system Check if a value has been assigned to Db data member.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TTag & GetTag(void) const
Get the Tag member data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetTag(void) const
appropriate tag Check if a value has been assigned to Tag data member.
const TDb & GetDb(void) const
Get the Db member data.
bool IsSetClass(void) const
endeavor which designed this object Check if a value has been assigned to Class data member.
const TClass & GetClass(void) const
Get the Class member data.
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.
const TStr & GetStr(void) const
Get the variant data.
void SetLabel(TLabel &value)
Assign a value to Label data member.
const TData & GetData(void) const
Get the Data member data.
void SetType(TType &value)
Assign a value to Type data member.
void ResetData(void)
Reset Data 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.
vector< CStringUTF8 > TStrs
vector< CRef< CUser_field > > TData
E_Choice Which(void) const
Which variant is currently selected.
@ e_not_set
No variant selected.
void SetHeader(THeader &value)
Assign a value to Header data member.
@ eField_id_location_id
location Seq-id
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
E_Choice Which(void) const
Which variant is currently selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
const TProduct & GetProduct(void) const
Get the Product member data.
bool IsBiosrc(void) const
Check if variant Biosrc is selected.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
bool IsRna(void) const
Check if variant Rna is selected.
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
@ e_not_set
No variant selected.
bool IsGeneral(void) const
Check if variant General is selected.
const TGeneral & GetGeneral(void) const
Get the variant data.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
list< CRef< CSeq_entry > > TSeq_set
@ eClass_nuc_prot
nuc acid and coded proteins
bool IsGenbank(void) const
Check if variant Genbank is selected.
list< CRef< CSeqdesc > > Tdata
const TUser & GetUser(void) const
Get the variant data.
TTitle & SetTitle(void)
Select the variant.
bool IsComment(void) const
Check if variant Comment is selected.
const TTitle & GetTitle(void) const
Get the variant data.
bool IsSource(void) const
Check if variant Source is selected.
TGenbank & SetGenbank(void)
Select the variant.
const TId & GetId(void) const
Get the Id member data.
const Tdata & Get(void) const
Get the member data.
const TGenbank & GetGenbank(void) const
Get the variant data.
TComment & SetComment(void)
Select the variant.
TSource & SetSource(void)
Select the variant.
TUser & SetUser(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetId(void) const
equivalent identifiers Check if a value has been assigned to Id data member.
bool IsTitle(void) const
Check if variant Title is selected.
const TComment & GetComment(void) const
Get the variant data.
bool IsUser(void) const
Check if variant User is selected.
@ e_User
user defined object
@ e_Comment
a more extensive comment
@ e_not_set
No variant selected.
@ eMol_na
just a nucleic acid
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
bool DoesApplyObjectMatchFieldConstraint(const CApplyObject &object, const string &field_name, CRef< CStringConstraint > string_constraint)
CRef< CCmdComposite > GetPropagateDBLinkCmd(CSeq_entry_Handle entry)
void x_AdjustListPair(vector< CRef< CApplyObject > > prev_list, vector< CRef< CApplyObject > > this_list)
vector< CRef< CApplyObject > > s_GetProtApplyObjectsFeatures(CBioseq_Handle p_bsh, CSeqFeatData::ESubtype constraint_type)
vector< CConstRef< CSeq_feat > > GetRelatedFeatures(const CSeq_feat &obj_feat, CSeqFeatData::ESubtype constraint_type, CRef< CScope > scope)
bool FocusedOnNucleotides(TConstScopedObjects &objects, const CSeq_entry_Handle &tse)
CRef< CCmdComposite > GetCommandFromApplyObject(CApplyObject &obj)
void AddMiscColumnsToTable(CRef< CSeq_table > table, const vector< string > &fields, CSeq_entry_Handle entry)
USING_SCOPE(ncbi::objects)
static const string kStructComment("StructuredComment")
static const string kStructCommentSuffix("StructuredCommentSuffix")
static size_t s_GetMaxRows(const vector< size_t > &rows)
bool DoesObjectMatchFieldConstraint(const CObject &object, const string &field_name, CRef< CStringConstraint > string_constraint, CRef< CScope > scope)
static const string kGenomeProjectId
static const string kStructCommentPrefix("StructuredCommentPrefix")
bool PropagateDBLink(CSeq_entry_Handle entry, CCmdComposite &cmd)
SStaticPair< const char *, CGeneralIDField::EGeneralIDPart > TGeneralIDPart
string GetExistingTextInstruction(EExistingText existing)
bool PropagateDescriptor(CSeq_entry_Handle entry, const CSeqdesc &desc, CCmdComposite &cmd)
vector< CRef< CApplyObject > > GetRelatedFeatureApplyObjects(const CSeq_feat &obj_feat, CSeqFeatData::ESubtype constraint_type, CRef< CScope > scope)
CRef< CSeq_table > GetMiscTableFromSeqEntry(const vector< string > &fields, CSeq_entry_Handle entry)
int GetNumberOfViewedBioseqs(TConstScopedObjects &objects)
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
vector< CConstRef< CSeq_feat > > s_GetProtFeatures(CBioseq_Handle p_bsh, CSeqFeatData::ESubtype constraint_type)
bool FocusedOnAll(TConstScopedObjects &objects, const objects::CSeq_entry_Handle &tse)
CRef< CUser_field > MakeTableMetaInfoField(EExistingText rule, bool erase_blanks)
DEFINE_STATIC_ARRAY_MAP(TGenIdPartMap, sm_GenIdMap, s_GenIDPartName)
string MakeTableMetaInfoString(EExistingText rule, bool erase_blanks)
bool IsSeqOrNP(CSeq_entry_Handle entry)
CSeq_entry_Handle s_GetNPParent(CSeq_entry_Handle seh)
static const TGeneralIDPart s_GenIDPartName[]
CStaticArrayMap< string, CGeneralIDField::EGeneralIDPart > TGenIdPartMap
vector< CRef< CMiscSeqTableColumn > > TMiscSeqTableColumnList
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
double f(double x_, const double &y_)
#define FOR_EACH_SEQID_ON_BIOSEQ(Itr, Var)
FOR_EACH_SEQID_ON_BIOSEQ EDIT_EACH_SEQID_ON_BIOSEQ.
Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.
bool QualifierNamesAreEquivalent(string name1, string name2)
CRef< CSeqTable_column > AddStringColumnToTable(CRef< CSeq_table > table, string label)
void AddValueToColumn(CRef< CSeqTable_column > column, string value, size_t row, edit::EExistingText existing_text=edit::eExistingText_replace_old)
void FillShortColumns(CRef< objects::CSeq_table > values_table)
#define row(bind, expected)
@ eExistingText_append_semi
@ eExistingText_append_space
@ eExistingText_prefix_colon
@ eExistingText_append_none
@ eExistingText_leave_old
@ eExistingText_prefix_none
@ eExistingText_prefix_space
@ eExistingText_append_colon
@ eExistingText_prefix_comma
@ eExistingText_append_comma
@ eExistingText_prefix_semi
@ eExistingText_replace_old
bool AddValueToString(string &str, const string &value, EExistingText existing_text)
Add text to an existing string, using the "existing_text" directive to combine new text with existing...
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
CRef< CCmdComposite > UpdatemRNAProduct(const objects::CSeq_feat &protein, objects::CScope &scope, string &message)